fix(copilot): the tool_call index starts from 1 in copilot + claude-sonnet-4.5 (#2794)
This commit is contained in:
@@ -320,7 +320,7 @@ M._defaults = {
|
|||||||
---@type AvanteSupportedProvider
|
---@type AvanteSupportedProvider
|
||||||
claude = {
|
claude = {
|
||||||
endpoint = "https://api.anthropic.com",
|
endpoint = "https://api.anthropic.com",
|
||||||
model = "claude-sonnet-4-20250514",
|
model = "claude-sonnet-4-5-20250929",
|
||||||
timeout = 30000, -- Timeout in milliseconds
|
timeout = 30000, -- Timeout in milliseconds
|
||||||
context_window = 200000,
|
context_window = 200000,
|
||||||
extra_request_body = {
|
extra_request_body = {
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ end
|
|||||||
function M:finish_pending_messages(ctx, opts)
|
function M:finish_pending_messages(ctx, opts)
|
||||||
if ctx.content ~= nil and ctx.content ~= "" then self:add_text_message(ctx, "", "generated", opts) end
|
if ctx.content ~= nil and ctx.content ~= "" then self:add_text_message(ctx, "", "generated", opts) end
|
||||||
if ctx.tool_use_list then
|
if ctx.tool_use_list then
|
||||||
for _, tool_use in ipairs(ctx.tool_use_list) do
|
for _, tool_use in pairs(ctx.tool_use_list) do
|
||||||
if tool_use.state == "generating" then self:add_tool_use_message(ctx, tool_use, "generated", opts) end
|
if tool_use.state == "generating" then self:add_tool_use_message(ctx, tool_use, "generated", opts) end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user