Merge branch 'badrisnarayanan:main' into fix/spawn-browser-launch

This commit is contained in:
jgor20
2026-01-17 13:31:21 +00:00
committed by GitHub
4 changed files with 133 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -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