1652 Commits

Author SHA1 Message Date
hkfires 70fdd70b84 refactor(cliproxy): extract generic buildConfigModels function for model info generation 2025-12-30 13:35:22 +08:00
hkfires 08ab6a7d77 feat(gemini): add per-key model alias support for Gemini provider 2025-12-30 13:27:57 +08:00
Luis Pater 9fa2a7e9df Merge pull request #782 from router-for-me/modelmappings
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
refactor(config): rename model-name-mappings to oauth-model-mappings
v6.6.69
2025-12-30 11:40:12 +08:00
hkfires d443c86620 refactor(config): rename model mapping fields from from/to to name/alias 2025-12-30 11:07:59 +08:00
hkfires 7be3f1c36c refactor(config): rename model-name-mappings to oauth-model-mappings 2025-12-30 11:07:58 +08:00
Luis Pater f6ab6d97b9 fix(logging): add isDirWritable utility to enhance log dir validation in ConfigureLogOutput 2025-12-30 10:48:25 +08:00
Luis Pater bc866bac49 fix(logging): refactor ConfigureLogOutput to accept config object and adjust log directory handling 2025-12-30 10:28:25 +08:00
Luis Pater 50e6d845f4 feat(cliproxy): introduce global model name mappings for improved aliasing and routing 2025-12-30 08:13:06 +08:00
Luis Pater a8cb01819d Merge pull request #772 from soffchen/main
fix: Implement fallback log directory for file logging on read-only system
2025-12-30 02:24:49 +08:00
Luis Pater 530273906b Merge pull request #776 from router-for-me/fix-ag-claude
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
fix(antigravity): inject required placeholder when properties exist w…
v6.6.68
2025-12-30 00:37:01 +08:00
Supra4E8C 06ddf575d9 fix(antigravity): inject required placeholder when properties exist without required 2025-12-29 23:55:59 +08:00
hkfires 3099114cbb refactor(api): simplify codex id token claims extraction
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
v6.6.67
2025-12-29 19:48:02 +08:00
Soff 44b63f0767 fix: Return an error if the user home directory cannot be determined for the fallback log path. 2025-12-29 18:46:15 +08:00
Soff Chen 6705d20194 fix: Implement fallback log directory for file logging on read-only systems. 2025-12-29 18:35:48 +08:00
Chén Mù a38a9c0b0f Merge pull request #770 from router-for-me/api
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
feat(api): add id token claims extraction for codex auth entries
v6.6.66
2025-12-29 00:44:41 -08:00
hkfires 8286caa366 feat(api): add id token claims extraction for codex auth entries 2025-12-29 16:34:16 +08:00
Chén Mù bd1ec8424d Merge pull request #767 from router-for-me/amp
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
feat(amp): add per-client upstream API key mapping support
v6.6.65
2025-12-28 22:10:11 -08:00
hkfires 225e2c6797 feat(amp): add per-client upstream API key mapping support 2025-12-29 12:26:25 +08:00
Luis Pater d8fc485513 fix(translators): correct key path for system_instruction.parts in Claude request logic 2025-12-29 11:54:26 +08:00
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