Skip to content

Add Gemini 3 support, fix tool call signatures, and add CORS middleware#2

Open
nurujjamanpollob wants to merge 4 commits into
emrullahakclk:mainfrom
nurujjamanpollob:main
Open

Add Gemini 3 support, fix tool call signatures, and add CORS middleware#2
nurujjamanpollob wants to merge 4 commits into
emrullahakclk:mainfrom
nurujjamanpollob:main

Conversation

@nurujjamanpollob
Copy link
Copy Markdown

Description

This PR introduces core support for the new Gemini 3 models, alongside several critical server enhancements to improve tool-calling reliability and browser-based client compatibility.

🚀 Key Changes

  • ✨ Gemini 3 Models Support: Added full mappings and compatibility for the new gemini-3-pro-preview and gemini-3-flash-preview models.
  • 🔧 Tool Call Signature Fix: Resolved payload formatting issues during tool execution to correctly match OpenAI/Anthropic spec expectations, preventing malformed requests.
  • 🌐 CORS Middleware (fix(server)): Integrated CORS middleware into the Express server to prevent Cross-Origin Resource Sharing errors for directly connected local web apps and browser clients.

🧪 How to Test

  1. Start the server via npm run dev.
  2. Route a request through the proxy using a Gemini 3 model alias (e.g., gemini-3-pro-high).
  3. Trigger a functional tool call from an agent (e.g., Claude Code, Aider) and verify the proxy console logs and proper signature interpretation.
  4. Make an API request from a local browser environment to http://localhost:3456 to confirm CORS headers are correctly applied and requests are not blocked.

- Resolves "blocked by CORS policy" errors when fetching AI models from web clients
- Adds `cors` and `@types/cors` dependencies
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.

1 participant