mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 02:04:05 +00:00
fix(ai): use parametersJsonSchema for Google tool declarations, revert Antigravity opus model
- Use parametersJsonSchema instead of parameters for Gemini tool declarations to support full JSON Schema (anyOf, oneOf, const, etc.) - Keep legacy parameters field for Claude models on Cloud Code Assist, where the API translates parameters into Anthropic's input_schema - Revert claude-opus-4-6-thinking back to claude-opus-4-5-thinking (model doesn't exist on the Antigravity endpoint) fixes #1398
This commit is contained in:
parent
82caf064e0
commit
1caadb2e2a
6 changed files with 26 additions and 12 deletions
|
|
@ -953,7 +953,10 @@ export function buildRequest(
|
|||
}
|
||||
|
||||
if (context.tools && context.tools.length > 0) {
|
||||
request.tools = convertTools(context.tools);
|
||||
// Claude models on Cloud Code Assist need the legacy `parameters` field;
|
||||
// the API translates it into Anthropic's `input_schema`.
|
||||
const useParameters = model.id.startsWith("claude-");
|
||||
request.tools = convertTools(context.tools, useParameters);
|
||||
if (options.toolChoice) {
|
||||
request.toolConfig = {
|
||||
functionCallingConfig: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue