Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion llm/ant/ant.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,11 +608,18 @@ func fromLLMToolChoice(tc *llm.ToolChoice) *toolChoice {
}

func fromLLMTool(t *llm.Tool) *tool {
schema := t.InputSchema
if schema == nil {
// Some proxies (e.g. Vertex AI via Langdock) strictly require input_schema
// to be present on every tool, even server-side tools where Anthropic's
// own API accepts omitting it. Default to an empty object schema.
schema = json.RawMessage(`{"type":"object","properties":{}}`)
}
return &tool{
Name: t.Name,
Type: t.Type,
Description: t.Description,
InputSchema: t.InputSchema,
InputSchema: schema,
CacheControl: fromLLMCache(t.Cache),
}
}
Expand Down