1533 Commits

Author SHA1 Message Date
hkfires f137eb0ac4 chore: add codex, agents, and opencode dirs to ignore files 2025-12-29 08:42:29 +08:00
Chén Mù f39a460487 Merge pull request #761 from router-for-me/log
fix(logging): improve request/response capture
2025-12-28 16:13:10 -08:00
Luis Pater ee171bc563 feat(api): add ManagementTokenRequester interface for management token request endpoints
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
v6.6.64
2025-12-29 02:42:29 +08:00
hkfires a95428f204 fix(handlers): preserve upstream response logs before duplicate detection 2025-12-28 22:35:36 +08:00
Michael Velbaum cb3bdffb43 refactor(logging): streamline auth selection debug messages
Reduce duplicate Debugf calls by appending proxy info via an optional suffix and keep the debug-level guard inside the helper.
2025-12-28 16:10:11 +02:00
Michael Velbaum 48f19aab51 refactor(logging): pass request entry into auth selection log
Avoid re-creating the request-scoped log entry in the helper and use a switch for account type dispatch.
2025-12-28 15:51:11 +02:00
Michael Velbaum 48f6d7abdf refactor(logging): dedupe auth selection debug logs
Extract repeated debug logging for selected auth credentials into a helper so execute, count, and stream paths stay consistent.
2025-12-28 15:42:35 +02:00
Michael Velbaum 79fbcb3ec4 fix(logging): quote OAuth account field
Use strconv.Quote when embedding the OAuth account in debug logs so unexpected characters (e.g. quotes) can't break key=value parsing.
2025-12-28 15:32:54 +02:00
Michael Velbaum 0e4148b229 feat(logging): disambiguate OAuth credential selection in debug logs
When multiple OAuth providers share an account email, the existing "Use OAuth" debug lines are ambiguous and hard to correlate with management usage stats. Include provider, auth file, and auth index in the selection log, and only compute these fields when debug logging is enabled to avoid impacting normal request performance.

Before:
[debug] Use OAuth user@example.com for model gemini-3-flash-preview
[debug] Use OAuth user@example.com (project-1234) for model gemini-3-flash-preview

After:
[debug] Use OAuth provider=antigravity auth_file=antigravity-user_example_com.json auth_index=1a2b3c4d5e6f7788 account="user@example.com" for model gemini-3-flash-preview
[debug] Use OAuth provider=gemini-cli auth_file=gemini-user@example.com-project-1234.json auth_index=99aabbccddeeff00 account="user@example.com (project-1234)" for model gemini-3-flash-preview
2025-12-28 15:22:36 +02:00
hkfires 3ca5fb1046 fix(handlers): match raw error text before JSON body for duplicate detection 2025-12-28 19:35:36 +08:00
hkfires a091d12f4e fix(logging): improve request/response capture 2025-12-28 19:04:31 +08:00
Luis Pater 457924828a Merge pull request #757 from ben-vargas/fix-thinking-toolchoice-conflict
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
Fix: disable thinking when tool_choice forces tool use
v6.6.63
2025-12-28 14:04:30 +08:00
Ben Vargas aca2ef6359 Fix: disable thinking when tool_choice forces tool use
Anthropic API does not allow extended thinking when tool_choice is set
to "any" or a specific tool. This was causing 400 errors when using
features like Amp's /handoff command which forces tool_choice.

Added disableThinkingIfToolChoiceForced() that removes thinking config
when incompatible tool_choice is detected, applied to both streaming
and non-streaming paths.

Fixes router-for-me/CLIProxyAPI#630
2025-12-27 16:31:37 -07:00
Luis Pater ade7194792 feat(management): add generic API call handler to management endpoints 2025-12-28 04:40:32 +08:00
Luis Pater 3a436e116a feat(cliproxy): implement model aliasing and hashing for Codex configurations, enhance request routing logic, and normalize Codex model entries
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
v6.6.62
2025-12-28 03:06:51 +08:00
Luis Pater 336867853b Merge pull request #756 from leaph/check-ai-thinking-settings
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
feat(iflow): add model-specific thinking configs for GLM-4.7 and Mini…
v6.6.61
2025-12-28 02:08:27 +08:00
leaph 6403ff4ec4 feat(iflow): add model-specific thinking configs for GLM-4.7 and MiniMax-M2.1
- GLM-4.7: Uses extra_body={"thinking": {"type": "enabled"}, "clear_thinking": false}
- MiniMax-M2.1: Uses reasoning_split=true for OpenAI-style reasoning separation
- Added preserveReasoningContentInMessages() to support re-injection of reasoning
  content in assistant message history for multi-turn conversations
- Added ThinkingSupport to MiniMax-M2.1 model definition
2025-12-27 18:39:15 +01:00
Luis Pater d222469b44 Update issue templates 2025-12-28 01:22:42 +08:00
Luis Pater 7646a2b877 Fixed: #749
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
fix(translators): ensure `gjson.String` content is non-empty before setting `parts` in OpenAI request logic
v6.6.60
2025-12-28 00:54:26 +08:00
Luis Pater 62090f2568 Merge pull request #750 from router-for-me/config
fix(config): preserve original config structure and avoid default value pollution
2025-12-27 22:10:01 +08:00
Luis Pater c281f4cbaf Fixed: #747
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
fix(translators): rename and integrate `usageMetadata` as `cpaUsageMetadata` in Claude processing logic
v6.6.59
2025-12-27 22:02:11 +08:00
hkfires 09455f9e85 fix(config): make streaming keepalive and retries ints 2025-12-27 20:56:47 +08:00
hkfires c8e72ba0dc fix(config): smart merge writes non-default new keys only 2025-12-27 20:28:54 +08:00
hkfires 375ef252ab docs(config): clarify merge mapping behavior 2025-12-27 19:30:21 +08:00
hkfires ee552f8720 chore(config): update ignore patterns 2025-12-27 19:13:14 +08:00
hkfires 2e88c4858e fix(config): avoid adding new keys when merging 2025-12-27 19:00:47 +08:00
Luis Pater 3f50da85c1 Merge pull request #745 from router-for-me/auth
fix(auth): make provider rotation atomic
2025-12-27 13:01:22 +08:00
hkfires 8be06255f7 fix(auth): make provider rotation atomic 2025-12-27 12:56:48 +08:00
Luis Pater 72274099aa Fixed: #738
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
fix(translators): refine prompt token calculation by incorporating cached tokens in Claude response handling
v6.6.58
2025-12-27 03:56:11 +08:00
Luis Pater dcae098e23 Fixed: #736
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
fix(translators): handle gjson string types in Claude request processing to ensure consistent content parsing
v6.6.57
2025-12-27 01:25:47 +08:00
Luis Pater 2eb05ec640 Merge pull request #727 from nguyenphutrong/main
docs: add Quotio to community projects
2025-12-26 11:53:09 +08:00
Luis Pater 3ce0d76aa4 feat(usage): add import/export functionality for usage statistics and enhance deduplication logic
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
v6.6.56
2025-12-26 11:49:51 +08:00
Trong Nguyen a00b79d9be docs(readme): add Quotio to community projects section 2025-12-26 10:46:05 +07:00
Luis Pater 33e53a2a56 fix(translators): ensure correct handling and output of multimodal assistant content across request handlers
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
v6.6.55
2025-12-26 05:08:04 +08:00
Luis Pater cd5b80785f Merge pull request #722 from hungthai1401/bugfix/remove-extra-args
Fixed incorrect function signature call to `NewBaseAPIHandlers`
2025-12-26 02:56:56 +08:00
Thai Nguyen Hung 54f71aa273 fix(test): remove extra argument from ExecuteStreamWithAuthManager call 2025-12-25 21:55:35 +07:00
Luis Pater 3f949b7f84 Merge pull request #704 from tinyc0der/add-index
fix(openai): add index field to image response for LiteLLM compatibility
2025-12-25 21:35:12 +08:00
Luis Pater 443c4538bb feat(config): add commercial-mode to optimize HTTP middleware for lower memory usage
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
v6.6.54
2025-12-25 21:05:01 +08:00
TinyCoder a7fc2ee4cf refactor(image): avoid using json.Marshal 2025-12-25 14:21:01 +07:00
Luis Pater 8e749ac22d docs(readme): update GLM model version from 4.6 to 4.7 in README and README_CN 2025-12-24 23:59:48 +08:00
Luis Pater 69e09d9bc7 docs(readme): update GLM model version from 4.6 to 4.7 in README and README_CN 2025-12-24 23:46:27 +08:00
Luis Pater 06ad527e8c Fixed: #696
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
fix(translators): adjust prompt token calculation by subtracting cached tokens across Gemini, OpenAI, and Claude handlers
v6.6.53
2025-12-24 23:29:18 +08:00
Luis Pater b7409dd2de Merge pull request #706 from router-for-me/log
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
Log
v6.6.52
2025-12-24 22:24:39 +08:00
hkfires 5ba325a8fc refactor(logging): standardize request id formatting and layout 2025-12-24 22:03:07 +08:00
Luis Pater d502840f91 Merge pull request #695 from NguyenSiTrung/main
feat: add cached token parsing for Gemini , Antigravity API responses
2025-12-24 21:58:55 +08:00
hkfires 99238a4b59 fix(logging): normalize warning level to warn 2025-12-24 21:11:37 +08:00
hkfires 6d43a2ff9a refactor(logging): inline request id in log output 2025-12-24 21:07:18 +08:00
Luis Pater 3faa1ca9af Merge pull request #700 from router-for-me/log
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
refactor(sdk/auth): rename manager.go to conductor.go
v6.6.51
2025-12-24 19:36:24 +08:00
Luis Pater 9d975e0375 feat(models): add support for GLM-4.7 and MiniMax-M2.1 2025-12-24 19:30:57 +08:00
hkfires 2a6d8b78d4 feat(api): add endpoint to retrieve request logs by ID 2025-12-24 19:24:51 +08:00