mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-22 04:04:05 +00:00
fix: Adjust max tokens for Anthropic and improve Google tools handling
- Reduce default max tokens for Anthropic to 1/3 of model max - Fix Google provider to properly handle empty tools array - Ensure toolConfig is undefined when no tools are present
This commit is contained in:
parent
433b42ac91
commit
73d2119606
2 changed files with 7 additions and 4 deletions
|
|
@ -261,7 +261,7 @@ function buildParams(
|
|||
const params: MessageCreateParamsStreaming = {
|
||||
model: model.id,
|
||||
messages: convertMessages(context.messages, model),
|
||||
max_tokens: options?.maxTokens || model.maxTokens,
|
||||
max_tokens: options?.maxTokens || (model.maxTokens / 3) | 0,
|
||||
stream: true,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue