Spaces:
Paused
Paused
Commit History
-
feat: add reasoning/thinking output support for OpenAI and Anthropic routes
icebear0828 +1: Claude Opus 4.6- Always send `summary: "auto"` to Codex API so reasoning summaries are available - Parse `response.reasoning_summary_text.delta/done` SSE events - OpenAI route: emit `reasoning_content` in chunks when client sends `reasoning_effort` - Anthropic route: emit thinking blocks when client sends `thinking.type: enabled/adaptive` - Extract block lifecycle helpers in Anthropic translator to eliminate duplication - Log unknown SSE events via console.debug for discovering new event types Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>7366e72 -
fix: support thinking/redacted_thinking content blocks in Anthropic schema
icebear0828 +1: Claude Opus 4.6Claude Code /compact sends conversation history containing thinking and redacted_thinking content blocks which were rejected by the Zod schema. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>ca7b1cb -
feat: add image input support for all API routes
icebear0828 +1: Claude Opus 4.6Previously all image content was silently discarded by the translation layer. Now image_url (OpenAI), image/base64 (Anthropic), and inlineData (Gemini) content parts are translated to Codex input_image format and passed through to the backend. Closes #25 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>142c9c4
-
fix: handle error SSE events from Codex API instead of silently dropping them
icebear0828 +1: Claude Opus 4.6When the Codex API returns `event: error` or `event: response.failed`, the proxy now surfaces the error message to clients instead of returning empty responses. Also detects non-SSE JSON error bodies from upstream. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>cf0807a
-
fix: support thinking.type "adaptive" for latest Claude Code
icebear0828 +1: Claude Opus 4.6Claude Code now sends thinking.type: "adaptive" (with optional budget_tokens) instead of always "enabled"/"disabled". Added the new variant to the Zod schema and translation logic. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>be3ca8e
-
feat: native tool calling support across all protocols (#8)
icebear +2: icebear0828, Claude Opus 4.6Unverified signature* feat: native tool calling support across all protocols - Fix 500 errors: wrap c.req.json() in try-catch for all 3 routes, returning proper 400 responses for malformed JSON - Forward tool definitions to Codex API instead of sending tools: [] - Parse function call SSE events (output_item.added, function_call_arguments.delta/done) with item_id→call_id mapping - Translate tool calls back to each protocol's format: OpenAI: streaming tool_calls chunks + finish_reason "tool_calls" Anthropic: tool_use content blocks + stop_reason "tool_use" Gemini: functionCall parts in candidates - Convert tool results from each protocol to native function_call_output input items - New shared module: tool-format.ts for cross-protocol tool conversion Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address review issues in native tool calling - Fix Gemini call_id collision: use counter-based IDs with name→callId correlation instead of fragile fc_${name} pattern - Remove dead c…ab2754a
-
feat: accept tool/function messages across all protocols
icebear0828 +1: Claude Opus 4.6Client frameworks (LangChain, AutoGen, Claude Code, etc.) often send conversation histories containing tool role messages and tool_calls. Previously, Zod validation rejected these requests outright. Since the Codex backend doesn't support tool calls, this implements a graceful degradation strategy: accept all tool-related fields in the schema, then flatten tool messages into human-readable text during translation. Covers both old (functions/function_call/role:function) and new (tools/tool_calls/role:tool) OpenAI formats, plus Anthropic (tool_use/tool_result) and Gemini (functionCall/functionResponse). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>759fe9e
-
feat: support developer role and array content in OpenAI protocol
icebear0828 +1: Claude Opus 4.6- Add "developer" to role enum (treated as system/instructions) - Accept array content parts (extract text, ignore non-text) - Flatten array content before passing to session manager Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>ebe8094
-
refactor: fingerprint alignment, auto-maintenance, Docker deployment
icebear0828 +1: Claude Opus 4.6Phase 1 - Eliminate fingerprint detection gaps: - Dynamic sec-ch-ua from config chromium_version (aligned with TLS profile) - Inject full fingerprint headers into curl-fetch (OAuth/appcast) - Unify Accept-Encoding based on curl-impersonate detection - Optimize header ordering (single sort pass) Phase 2 - Auto-maintenance: - Structured YAML mutation utility (replace regex hacks) - Auto full-update pipeline on new version detection - Config hot-reload after updates - Exponential backoff token refresh (5 attempts + 10m recovery) - Immediate persistence for critical data (tokens, cf_clearance) - Cookie v2 format with expiry timestamps - Graceful shutdown with 10s timeout protection - Usage counters auto-reset on rate limit window rollover Phase 3 - Docker deployment: - Dockerfile, docker-compose.yml, .dockerignore - Deployment docs in README Fixes: - Extract planType from JWT /auth claim (was looking in /profile) - Backfill missing planType on startup for existing accounts - Show full d…347f81b -
refactor: extract shared proxy handler, eliminate route duplication
icebear0828 +1: Claude Opus 4.6- Extract withRetry() to src/utils/retry.ts (was duplicated 3x) - Create shared proxy-handler.ts encapsulating acquire/stream/release lifecycle - Refactor chat.ts, messages.ts, gemini.ts to use shared handler (-264 lines net) - Convert models.ts from default export to named createModelRoutes() - Extract GEMINI_STATUS_MAP to types/gemini.ts (was duplicated in error-handler) - Add SessionManager.destroy() with interval cleanup + unref - Remove dead captureCookies() method from codex-api.ts - Add stack trace logging to error handler - Fix hardcoded localhost in startup message - Use atomic write-to-temp-then-rename for cookie-jar and account-pool - Add warning logs for previously silent catch blocks Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>8b777a2 -
feat: multi-protocol support — Anthropic Messages API + Google Gemini API
icebear0828 +1: Claude Opus 4.6Add two new protocol translation layers so the proxy can serve clients speaking Anthropic (/v1/messages) or Gemini (/v1beta/models/:model:generateContent) in addition to the existing OpenAI /v1/chat/completions endpoint. All three protocols translate to the same upstream Codex Responses API. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>d0eb8b9
-
Initial commit: Codex Proxy with quota API and Cloudflare bypass
icebear0828 +1: Claude Opus 4.6OpenAI-compatible proxy that translates Chat Completions API to ChatGPT's Codex Responses API. Includes multi-account management, official quota querying via curl subprocess (bypasses Cloudflare TLS fingerprinting), per-account cookie jar, and full API documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>5d0a52f