Merge branch 'badrisnarayanan:main' into fix/spawn-browser-launch
This commit is contained in:
@@ -123,8 +123,8 @@ export async function* streamSSEResponse(response, originalModel) {
|
||||
};
|
||||
|
||||
} else if (part.text !== undefined) {
|
||||
// Skip empty text parts
|
||||
if (!part.text || part.text.trim().length === 0) {
|
||||
// Skip empty text parts (but preserve whitespace-only chunks for proper spacing)
|
||||
if (part.text === '') {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -226,6 +226,16 @@ export function convertAnthropicToGoogle(anthropicRequest) {
|
||||
|
||||
googleRequest.tools = [{ functionDeclarations }];
|
||||
logger.debug(`[RequestConverter] Tools: ${JSON.stringify(googleRequest.tools).substring(0, 300)}`);
|
||||
|
||||
// For Claude models, set functionCallingConfig.mode = "VALIDATED"
|
||||
// This ensures strict parameter validation (matches opencode-antigravity-auth)
|
||||
if (isClaudeModel) {
|
||||
googleRequest.toolConfig = {
|
||||
functionCallingConfig: {
|
||||
mode: 'VALIDATED'
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Cap max tokens for Gemini models
|
||||
|
||||
Reference in New Issue
Block a user