Commit Graph
9 Commits
Author SHA1 Message Date
Владимир АкимовandClaude 7076108550 fix(translator): filter nameless hosted tools when converting Responses API to Chat format (#222)
Codex CLI sends "hosted" tools (e.g. `request_user_input`) via the OpenAI
Responses API. These tools have no explicit `name` field. The previous
`body.tools.map()` pass propagated `name: undefined` into the resulting
Chat Completions function declarations, which then became anonymous
`functionDeclarations` after the OpenAI→Gemini translation step.

Gemini strictly requires every function declaration to have a valid name
and rejects the entire request with:

  GenerateContentRequest.tools[0].function_declarations[4].name:
  Invalid function name. Must start with a letter or an underscore.

Fix: filter out any Responses API tool that lacks a non-empty `name`
string before converting to `{ type: "function", function: { name, ... } }`.
Named function tools are unaffected; only unnamed hosted tools are skipped.

Fixes: Gemini 400 error when Codex CLI is routed through 9router.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-01 08:48:43 +00:00
Cengizhan f763d4ffed fix: resolve GitHub Copilot 400 error for Claude models in Cursor IDE (#220)
- github.js: add sanitizeMessages() to convert unsupported content types
  (tool_use, tool_result, thinking) to plain text before sending to
  GitHub /chat/completions endpoint
- openai-responses.js: skip pushing message blocks with empty content
  (e.g. assistant messages that only contain tool_calls)
- providerModels.js: revert targetFormat changes (not needed with sanitize fix)

Fixes: https://github.com/decolua/9router/issues/219
2026-03-01 15:38:14 +07:00
decolua a7365c5a4e Fix : Codex on cursor 2026-03-01 15:35:41 +07:00
ac7cedd27e feat(responses): respect client streaming preference + string input support (#121)
- Remove forced stream=true from responsesHandler
- Add stream-to-JSON converter for non-streaming clients (Codex)
- Accept string input in Responses API (normalize to array)
- Codex SSE header fallback for missing Content-Type
- Refactor: extract shared normalizeResponsesInput()

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-15 11:47:55 +07:00
39c555ca7e docs: clarify Droid CLI compatibility comment in Responses API translator
Co-authored-by: Emanuel Covelli <emanuel.covelli@netserv.it>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 09:56:57 +07:00
decolua 3c65e0c5f2 feat: Improve Antigravity quota monitoring and fix Droid CLI compatibility 2026-02-05 22:15:26 +07:00
decolua c7219d0ac9 Fix cloud 2026-01-29 18:07:28 +07:00
decolua 26b61e5fbb Feat Kiro OAuth, Fix Codex 2026-01-15 18:29:47 +07:00
decolua 18533505ef refactor: restructure translator from from-openai/to-openai to request/response folders 2026-01-09 17:14:51 +07:00