Skip to content

fix: WebSearch providers + MCPTool bugs#590

Closed
FluxLuFFy wants to merge 2 commits into
Gitlawb:mainfrom
FluxLuFFy:main
Closed

fix: WebSearch providers + MCPTool bugs#590
FluxLuFFy wants to merge 2 commits into
Gitlawb:mainfrom
FluxLuFFy:main

Conversation

@FluxLuFFy

Copy link
Copy Markdown
Contributor

WebSearch Providers

  • custom.ts: fix buildAuthHeadersForPreset WEB_AUTH_HEADER opt-out
  • custom.ts: fix WEB_AUTH_SCHEME empty string handling
  • custom.ts: fix walkJsonPath null safety for jsonPath parsing
  • duckduckgo.ts: use SafeSearchType enum instead of raw 0
  • mojeek.ts: always send Accept: application/json header
  • README: fix timeout documentation (15s -> 120s)
  • custom.test.ts: add tests for auth header behavior

MCPTool

  • MCPTool.ts: fix outputSchema to accept ContentBlockParam[] (not just string)
  • MCPTool.ts: fix isResultTruncated for array output (iterates text blocks)

WebSearchTool:
- custom.ts: fix buildAuthHeadersForPreset WEB_AUTH_HEADER opt-out
- custom.ts: fix WEB_AUTH_SCHEME empty string handling
- custom.ts: fix walkJsonPath null safety for jsonPath parsing
- duckduckgo.ts: use SafeSearchType enum instead of raw 0
- mojeek.ts: always send Accept: application/json header
- README: fix timeout documentation (15s -> 120s to match code)
- custom.test.ts: add tests for auth header behavior

MCPTool:
- MCPTool.ts: fix outputSchema to accept ContentBlockParam[] (not just string)
- MCPTool.ts: fix isResultTruncated for array output (iterates text blocks)
@FluxLuFFy

FluxLuFFy commented Apr 11, 2026

Copy link
Copy Markdown
Contributor Author

- Add native Gemini shim (geminiShim.ts) using @google/generative-ai SDK
  directly instead of OpenAI-compatible endpoint. Fixes thought_signature
  400 errors since the native SDK handles function calling natively.
- Rename CLAUDE_CODE_USE_GEMINI → CLAUDE_CODE_GOOGLE across all files.
- Fix thought_signature sentinel in openaiShim.ts — replace rejected
  'skip_thought_signature_validator' with deterministic pseudo-signature
  from tool call ID for OpenAI-compatible fallback path.
- Update StartupScreen: show 'Google (compatible)' provider label, add
  Search line showing active search provider (firecrawl, tavily, ddg, etc.)
- Update tests for native Gemini routing. All 682 tests pass.
@FluxLuFFy FluxLuFFy closed this Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants