Commit Graph

70 Commits

Author SHA1 Message Date
yetone
04336913b3 Revert "fix max_tokens for reasoning models (#1819)" (#1839)
* Revert "fix max_tokens for reasoning models (#1819)"

This reverts commit 1e2e233ff5.

* Revert "fix: revert max_completion_tokens to max_tokens (#1741)"

This reverts commit cd13eeb7d9.

* fix: nvim_version
2025-04-09 16:58:54 +08:00
PSeitz
1e2e233ff5 fix max_tokens for reasoning models (#1819) 2025-04-07 13:55:40 +08:00
yetone
cd13eeb7d9 fix: revert max_completion_tokens to max_tokens (#1741) 2025-03-27 16:53:55 +08:00
yetone
25e9b1c111 fix: copilot's openai tool description cannot use long text (#1700) 2025-03-24 19:54:06 +08:00
yetone
49ae3c84fd feat: add view_range parameter and remove read_file llm tool (#1690) 2025-03-24 15:07:14 +08:00
kernitus
7d137d32cb fix: do not allow max_tokens & max_completion_tokens at the same time (#1633)
* fix: do not allow max_tokens & max_completion_tokens at the same time

* chore: fix formatting
2025-03-19 01:44:41 +08:00
kernitus
10ce065d9e feat: update openai/azure params (#1604)
* feat(openai): use max_completion_tokens & reasoning_effort params

* feat(openai): use developer prompt for reasoning models

* docs: update openai config in readme

* refactor: follow lua style quotes

* fix(azure): rename max_tokens to max_completion_tokens

* refactor(azure): remove duplicate field

* refactor: update types

* refactor(azure): update type
2025-03-18 19:40:20 +08:00
Florian Engelhardt
3b86549485 Add extra headers for OpenAI (#1615) 2025-03-17 17:51:08 +08:00
brook hong
e204ca1cf3 feat: support tools in bedrock (#1598) 2025-03-17 13:42:18 +08:00
yetone
eb5a2f6cca fix: missing tool use (#1610) 2025-03-17 05:00:03 +08:00
yetone
dfdab1d41f fix: openai tool histories (#1606) 2025-03-17 03:06:26 +08:00
yetone
6e77da83c1 fix: better sidebar (#1603)
* fix: better sidebar

* feat: better msg history

* fix: tests
2025-03-17 01:40:05 +08:00
yetone
f9f92dc9d4 Revert "fix: Always handle the extra response outside of stream, such as the exceptions from bedrock (#1526)" (#1569)
This reverts commit f9ab6934d2.
2025-03-12 19:10:05 +08:00
brook hong
f9ab6934d2 fix: Always handle the extra response outside of stream, such as the exceptions from bedrock (#1526) 2025-03-12 16:29:32 +08:00
yetone
aa2c2b0054 fix: stricter static typing (#1550) 2025-03-11 00:41:21 +08:00
yetone
750ee80971 feat: add ollama as supported provider (#1543)
* feat: add ollama as supported provider

*This implementation is only working with `stream = true`*
- Uses the actual ollama api and allows for passing additional options
- Properly passes the system prompt to api

Use ollama as provider in opts like this:
opts = {
        debug = true,
        provider = "ollama",
        ollama = {
                api_key_name = "",
                endpoint = "http://127.0.0.1:11434",
                model = "qwen2.5-coder:latest",
                options = {
                        num_ctx = 32768,
                        temperature = 0,
                },
                stream = true,
        },

* fix: ollama types

---------

Co-authored-by: jtabke <25010496+jtabke@users.noreply.github.com>
2025-03-10 02:23:56 +08:00
yetone
8620ea3e12 refactor: summarize memory (#1508) 2025-03-07 00:12:57 +08:00
yetone
5aa55689ff fix: bedrock claude do not support prompt caching (#1507) 2025-03-06 18:31:56 +08:00
yetone
0d592f440c Revert "refactor: message content (#1424)" (#1442)
This reverts commit ae8497faf1.
2025-03-01 13:25:51 +08:00
yetone
ae8497faf1 refactor: message content (#1424) 2025-02-28 14:43:39 +08:00
Peter Cardenas
afa674c6fd chore: prefer not to use function assignment (#1381) 2025-02-25 12:08:03 +08:00
yetone
b04bffa441 fix: types (#1344) 2025-02-22 23:24:20 +08:00
zerogog
a17d4b00e2 fix: #1176 Gemini model in OpenRouter not finish their response (#1292) 2025-02-18 22:59:16 +08:00
8uff3r
f70eb1040c fix(providers/openai): check for vim.NIl on tool_calls (#1283) 2025-02-17 12:54:58 +08:00
yetone
ce55d7ac9e refactor: better value name (#1261) 2025-02-13 01:39:02 +08:00
yetone
5f6612fb8c fix: support multiple tool use (#1192) 2025-02-06 16:41:28 +08:00
yetone
d1cc23fa54 fix: multiple tool use histories and disable tools (#1185) 2025-02-06 02:46:52 +08:00
yetone
3aaf7dad77 feat: tools support copilot (#1183) 2025-02-05 23:47:52 +08:00
yetone
1437f319d2 feat: tools (#1180)
* feat: tools

* feat: claude use tools

* feat: openai use tools
2025-02-05 22:39:54 +08:00
yetone
ef4b6077ec feat: supports openrouter reasoning (#1174) 2025-02-04 01:38:18 +08:00
yetone
cd7390de21 fix: remove unnecessary think tag (#1173) 2025-02-03 22:32:41 +08:00
yetone
8536d102be fix: reasoning content processing (#1171) 2025-02-03 21:55:12 +08:00
yetone
5ac934f228 chores: remove debug log (#1160) 2025-02-02 02:29:41 +08:00
yetone
b5ac768416 feat: supports reasoning_content (#1159) 2025-02-02 02:12:14 +08:00
yetone
3ec847e3cb fix(ci): lua lint (#1035) 2025-01-05 17:11:15 +08:00
Larry Lv
ec5d1abf34 fix(openai): support all o series models (#1031)
Before this change, since `max_completion_tokens` was not set for `o` series models, the completion request will time out sometimes. This makes sure it converts the `max_tokens` parameter to `max_completion_tokens` for `o` series models.

I tested this change with `gpt-4o-mini`, `o1-mini` and `o3-mini`, and they all still work as expected.
2025-01-05 13:23:33 +08:00
yetone
01e05a538b fix: more reasonable error reporting (#965) 2024-12-18 23:16:41 +08:00
Aaron Batilo
e60ccd2db4 feat: enable streaming for o1 models (#896)
As of a few days ago, o1 models support streaming responses. Please see:
https://community.openai.com/t/openai-o1-streaming-now-available-api-access-for-tiers-1-5/1025430
2024-11-24 17:28:27 +08:00
yetone
9891b03656 fix(openai): user and assistant roles should be alternating (#859) 2024-11-17 03:49:02 +08:00
yetone
ff85b9c1e2 refactor: remove redundant local field to facilitate provider configuration (#858) 2024-11-17 02:55:40 +08:00
yetone
4acdcb6e8b fix: provider inherited_from (#857) 2024-11-17 01:09:33 +08:00
yetone
dfc51b3247 feat: add url_join (#856) 2024-11-17 00:39:03 +08:00
insects
ecaf850859 fix(compat): filter out non value and not user message (#818)
Co-authored-by: Aaron Pham <Aaronpham0103@gmail.com>
Co-authored-by: Aaron Pham <contact@aarnphm.xyz>
2024-11-07 05:38:56 -05:00
insects
ec9b00db8b fix(openai): add backward compat for get_user_message (#813)
Co-authored-by: ming.chen <ming.chen@shopee.com>
Co-authored-by: Aaron Pham <Aaronpham0103@gmail.com>
2024-11-07 02:16:19 -05:00
yetone
1e8abbf798 feat: memory 🧠 (#793) 2024-11-04 16:20:28 +08:00
Aaron Batilo
f92c3a60f3 fix: support legacy finish_reason (#706)
Many OpenAI compatible alternative servers are still returning a
`finish_reason` of `eos_token` instead of `stop`. This commit adds
support for that to support more of these servers/options.
2024-10-11 21:46:34 +08:00
Sapir Shemer
d74c9d0417 feat: supports openai o1-preview
* feat: make O1 models on openai work by handle non-streams & correct
parameters

* chore: set temperature automatically when using o1 models
2024-09-27 21:08:10 +08:00
Aaron Pham
2b89f0d529 perf(anthropic): prompt-caching (#517)
bring back prompt caching support on Anthropic

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-09-04 03:19:33 -04:00
Aaron Pham
e57a3f27df chore(provider): use default value set in metaclass (#503)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-09-03 21:56:52 -04:00
Aaron Pham
0d8098e4eb fix(style): add parentheses (#471)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2024-09-03 05:12:07 -04:00