272 Commits

Author SHA1 Message Date
Matthieu Coudron
68b624ab5b chore: sort providers by name (#2876) 2025-12-19 12:37:37 +08:00
XuJiawei
42028811e4 refine: replace vim.fn.system with vim.system (#2863) 2025-12-13 18:58:10 +08:00
Leonardo Mariscal
4d9d2de6fe openai provider add empty parameters to tool call (#2845) 2025-11-28 20:03:58 +08:00
brook hong
de6febb094 fix: hangs on tool calling to read_todos (#2835) 2025-11-28 20:03:46 +08:00
you-n-g
f8a7cd1a60 fix: gpt-5-chat is not a reasoning model
* Exclude GPT-5-Chat 

Exclude GPT-5-Chat. It is not a reasoning model.

* [pre-commit.ci lite] apply automatic fixes

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-11-09 21:39:45 +08:00
yetone
d45b622193 Auto select Copilot Response API for GPT-5 Codex models (#2808) 2025-10-30 22:38:32 +08:00
yetone
b95e27b5a6 feat: supports OpenAI Response API and copilot's gpt-5-codex model (#2802)
* fix: upgrade vscode version

* feat: support openai response api

* refactor: refine todos tools

* fix: trim suffix empty lines
2025-10-30 02:18:48 +08:00
yetone
164a86db6e fix(copilot): the tool_call index starts from 1 in copilot + claude-sonnet-4.5 (#2794) 2025-10-22 17:45:37 +08:00
Dmitry Torokhov
2f9daf2bc6 feat(ollama): provide a helper to enable ollama when service is available
Ollama is disabled by default, as it normally does not require API keys
to be defined. Users are supposed to override is_env_set() method in
their configs to enable Ollama.

Provide check_endpoint_alive() helper in Ollama provider module that can
be used directly in place of is_env_set() and checks whether the server
replies to "get list of models" query:

...
  ollama = {
    is_env_set = require("avante.providers.ollama").check_endpoint_alive,
  },
...
2025-10-16 22:09:54 -07:00
Dmitry Torokhov
3e8557a29e fix(ollama): properly handle errors from curl when querying models
Without on_error() handler curl.get() will raise an error which then
will interrupt execution of the plenary job. This interruption will
result in timeout handling code triggering, introducing unneeded delay
and ugly stack traces.

Fix the problem by defining on_error() and callback() handlers and
explicitly wait for job completion with pcall() and Job:wait(). This
allows proper error handling and control over error messages.

Because plenary's curl implementation mangles stderr data, use a local
table to map select error codes to descriptive text messages.

Also do not emit hard error when endpoint is not configured, use
Utils.error().
2025-10-16 22:09:54 -07:00
Dmitry Torokhov
cccf5344ef feat(ollama): do not inherit default models from OpenAI provider
With Ollama majority of people are using their own models, and Ollama
provider by default queries the server for list of models, so there is
no need to inherit anything.
2025-10-16 22:09:54 -07:00
Tray
612f4a51bb [vertex] Allow project to be set via env var (#2739) 2025-10-16 22:29:51 +08:00
Dmitry Torokhov
0716819a0e feat(providers): fail gracefully when a provider is misconfigured (#2768) 2025-10-15 18:43:55 +08:00
Peter Cardenas
a7052aca0b feat: allow switching between acp providers with AvanteSwitchProvider (#2746) 2025-10-06 18:21:50 +08:00
Florian Engelhardt
5e4bb50dda Add support for Claude Sonnet 4.5 (#2736) 2025-10-02 11:29:30 +08:00
brook hong
ab6fb1c5b8 fix: AWS CLI is only needed if aws_profile is used for authoriztion of bedrock (#2706) 2025-09-15 13:16:50 +08:00
Matéo
39336ca00a fix: mistral ai bug 400 role user after role tool (#2695) 2025-09-08 10:38:55 +08:00
brook hong
47877c7e8b fix: bedrock exception could be found at end of a stream (#2654) 2025-08-31 19:11:04 +08:00
yetone
5e0aa7e5c0 feat: support acp (#2649) 2025-08-31 07:41:19 +08:00
brook hong
751e4c0913 feat: support multiple models for bedrock (#2648) 2025-08-28 20:23:05 +08:00
Fabian Klopfer
11e457e56b [feat] Add basic support for IBM's watsonx code assistant (#2617)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-08-26 17:26:15 +08:00
yetone
1e0c8520bc fix: the last used model caused the loss of the model configured in the profile in the model selector (#2600) 2025-08-12 15:33:31 +08:00
yetone
6bcf7dfbe7 fix: still use str_replace_editor (#2587) 2025-08-06 11:39:13 +08:00
PlacidFireball
6d372a9135 fix: set the content property to the empty string (#2566)
Co-authored-by: Jared Weiss <jared.weiss@quiq.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-08-02 15:37:19 +08:00
brook hong
7965546a34 fix: do not ask for API key for bedrock if aws_profile was set (#2564) 2025-08-02 13:00:00 +08:00
Shogo Nakamoto
ca63356a99 feat: allow overriding bedrock provider endpoint (#2540) 2025-07-31 14:15:34 +08:00
Dmitry Torokhov
5bc4ffa19f refactor(bedrock): replace vim.uv.spawn() with vim.system()
Instead of implementing synchronous call to a command line utility via
vim.uv.spawn() switch to using vim.system(). Its return value (object)
wait() method allows to specify timeout too.

This makes code much simpler.
2025-07-31 14:12:13 +08:00
yetone
8bc149ccd8 fix: react prompts (#2537) 2025-07-26 16:06:56 +08:00
yetone
1452c7233b fix: invalid json format (#2531) 2025-07-24 17:37:10 +08:00
Dmitry Torokhov
aa606b6147 refactor(history): change HistoryMessage:new() to accept role and item
Change the constructor to accept role and a single content item instead
of raw AvanteLLMMessage instance. This will help when we will start
changing message.content from being a string or a list of tables to just
a string or a single table.
2025-07-22 17:49:28 +08:00
Daniel Nyong
c694772d68 fix: vertex gemini 2025-07-21 21:55:53 +08:00
yetone
a08a2e3579 feat: add original_content for history message 2025-07-17 15:45:23 +08:00
yetone
cf5234b4d9 optimize: reduce copilot invocation consumption 2025-07-17 14:21:34 +08:00
yetone
2a16e7d4d9 fix: do not modify the tool_use input 2025-07-16 20:18:24 +08:00
Dmitry Torokhov
34907fc1cd refactor(history): start moving history-related code into avante/history
The utils module has grown too big and contains unrelated functionality.
Start moving code related to managing history messages comprising chat
history into lua/avante/history module to keep the code more manageable.
2025-07-16 12:49:15 +08:00
yetone
14cfccdba9 fix: do not use str_replace_editor (#2428) 2025-07-10 10:17:48 +08:00
Kyle
9f4da7ea09 fix(openai): handle nil function arguments in tool calls (#2425) 2025-07-09 14:19:29 +08:00
yetone
d98f676e32 fix: ReAct parsing (#2375) 2025-06-30 16:40:52 +08:00
Fredrik Averpil
2d9247e536 feat(providers): Defer execution of cmd: API keys (#2372) 2025-06-30 10:25:14 +08:00
Noah Chalifour
f04cee670d fix: error on calling transform_anthropic_usage on a nil with bedrock (#2360)
Co-authored-by: Noah Chalifour <nchalifo@amazon.com>
2025-06-28 21:39:39 +08:00
Daryl
8da09eae1d fix: forbidden inputs in mistral ai (#2348) 2025-06-27 15:27:40 +08:00
yetone
e89f1fd922 fix: copilot do not carry tools in ReAct situations (#2331) 2025-06-25 18:12:56 +08:00
yetone
07b703dbd5 fix: ReAct parser (#2330) 2025-06-25 16:55:10 +08:00
brook hong
46d27ff0fd fix: error on calling transform_anthropic_usage on a nil value from bedrock (#2321) 2025-06-24 20:44:57 +08:00
miguelosana
0910696737 fix: Include transform_anthropic_usage (#2319)
Co-authored-by: Miguelo Sana <miguelo@incubeta.com>
2025-06-24 19:16:27 +08:00
yetone
b6668e2e4c feat: better copilot headers (#2313) 2025-06-24 02:32:51 +08:00
yetone
b72581b23b fix: ollama is_env_set (#2304) 2025-06-23 12:05:50 +08:00
yetone
6830f2d8b9 feat: tokens usage (#2300) 2025-06-23 03:13:37 +08:00
Andriy Rakhnin
a0fc91d4c8 fix: parse_api_key inheritance problem (#2252) 2025-06-23 01:13:15 +08:00
yetone
3033556d5b fix: tool calling (#2297) 2025-06-22 21:50:26 +08:00