Commit Graph
89 Commits
Author SHA1 Message Date
RCDandClaude 41b1ad654e feat(config): add oauth-model-alias migration support
Add migration logic for converting oauth-model-mappings to oauth-model-alias
with comprehensive test coverage.

Co-Authored-By: Claude (gemini-claude-opus-4-5-thinking) <noreply@anthropic.com>
2026-01-29 21:30:09 +07:00
RCDandClaude 1fa155621b feat: sync with upstream v6.7.28
Cherry-picked changes from CLIProxyAPI v6.7.28:

- feat(handlers): add test to verify no retries after partial stream response (4eb1e60)
- fix(config): prune oauth-model-alias when preserving config (d0bada7)

Note: fix(api): update amp module only on config changes (8510fc3) was skipped
as ProxyPilot does not have the Amp feature.

Co-Authored-By: Claude (gemini-claude-opus-4-5-thinking) <noreply@anthropic.com>
2026-01-29 18:48:10 +07:00
Finessse 9f5eb93f64 sync(upstream): add HttpRequest support across executors
Cherry-picked from e8e3bc86. Adds HttpRequest method to ProviderExecutor
interface for injecting credentials into arbitrary HTTP requests.

- Added HttpRequest to conductor.go interface
- Added HttpRequest stubs to kiro, minimax, zhipu executors
- Added http-request example
- Updated mock executors in tests

Also kept our Embed method and CountTokens implementations.
2026-01-11 06:32:53 +07:00
Finessse fd9d097b8e sync(upstream): management API and executor improvements
- feat(management): add generic API call handler
- Fix: disable thinking when tool_choice forces tool use
- feat(api): add ManagementTokenRequester interface (sans iflow)
- fix(management): refresh antigravity token for api-call $TOKEN$
- fix(auth): error when antigravity refresh token missing during refresh

Cherry-picked: ade71947, aca2ef63, ee171bc5, b01619b4, 5e5d8142
Adapted: removed iflow references (not in ProxyPilot)
2026-01-11 06:00:37 +07:00
Finessse 4bf4256e3f sync(upstream): logging/handlers improvements
- fix(logging): improve request/response capture
- fix(handlers): match raw error text before JSON body for duplicate detection
- feat(logging): disambiguate OAuth credential selection in debug logs
- Various logging refinements for auth selection

Cherry-picked from upstream: a091d12f, 3ca5fb10, 0e4148b2, 79fbcb3e, 48f6d7ab, 48f19aab, cb3bdffb, a95428f2
2026-01-11 05:57:48 +07:00
Finessse bc3d89d958 perf(handlers): cache request details lookup per model 2026-01-09 23:38:21 +07:00
Finessse 5d9d4328f9 refactor(handlers): use pooled SSE writer helpers across all providers 2026-01-09 23:38:09 +07:00
Finessse b02b3c32ce perf(sdk): use pre-allocated byte slice for SSE keep-alive 2026-01-09 23:37:55 +07:00
Finessse 616cde1a0f test(sdk): add stream forwarder benchmarks 2026-01-09 23:37:41 +07:00
Finessse d2efc1dd8e feat(sdk): add pooled SSE writer helpers for reduced allocations 2026-01-09 23:37:29 +07:00
Finessse 30978f1f17 feat(cache): add response cache and prompt cache tracking
Response cache stores completions keyed by request hash.
Prompt cache tracking aggregates cache_read/cache_creation tokens.
WebUI CacheStats component shows hit rates and token savings.
2026-01-06 06:21:54 +07:00
Finessse 7d9a114bf8 feat(config): add global model mapping hook for SDK handlers
Adds GlobalModelMapperFunc type and hook to SDKConfig, allowing
SDK-level handlers to access Config-level global model mappings.
This enables cross-provider model aliasing (e.g., gpt-4o → claude-sonnet).
2025-12-28 10:45:26 +07:00
Finessse b127b674e9 sync: squash merge upstream CLIProxyAPI v6.6.62
Synced with upstream v6.6.61-v6.6.62 changes:
- Added usage export/import endpoints
- Added normalizeCodexKey function
- Updated BootstrapRetries type
- Enhanced model definitions and antigravity config

Preserved ProxyPilot customizations:
- Kept CompressionConfig for long-context sessions
- Kept Kiro, GitHub Copilot, Amazon Q model definitions
- Kept shouldKeepProviderOrder for Gemini-3 provider stability
- Kept advanceProviderCursor pattern (separate cursor advancement)
- Removed AmpCode integration (not used)

Version: 0.1.4
2025-12-28 08:32:11 +07:00
Finessse 281ac2e0ba refactor(backend): improve API and internal services
- Add request logging middleware
- Update integrations handler
- Improve desktopctl with browser opening
- Add client model interfaces
- Enhance usage logger plugin
- Update SDK handlers
2025-12-28 00:06:07 +07:00
FinessseandClaude Opus 4.5 d3466b31af fix(sdk): update stream forwarder for compression
Update stream forwarder to work with token-aware
compression middleware.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 05:10:43 +07:00
FinessseandClaude Opus 4.5 f19594e490 fix(sdk): update handlers for compression support
Update SDK handlers to integrate with token-aware
compression middleware.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 05:10:33 +07:00
FinessseandClaude Opus 4.5 221a386040 feat: sync with CLIProxyAPIPlus (excludes Amp, GitHub Copilot)
Synced all changes from router-for-me/CLIProxyAPIPlus including:

Executor updates:
- claude_executor: response decompression, beta extraction, model resolution
- gemini_executor/codex_executor: usage reporting
- antigravity_executor: fallback URLs, thinking metadata, token refresh
- kiro_executor: token refresh, profile ARN handling, quota fallback

Translator updates:
- Updated all translators for improved request/response handling
- Enhanced tool result formatting and streaming support

Configuration:
- Added IncognitoBrowser option for OAuth
- Updated KiroKey configuration
- Enhanced PayloadConfig options

SDK updates:
- Auth refresh registry improvements
- Cliproxy service enhancements
- Added ErrNotImplemented for executor interface

Excluded features (not synced):
- Amp CLI Integration module
- GitHub Copilot executor

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 02:10:20 +07:00
Finessse f83d2b638a chore: final legacy model purge and documentation update 2025-12-25 05:52:43 +07:00
Finessse 53918b4c92 feat(registry): upgrade model registry and thinking logic 2025-12-25 05:47:23 +07:00
Finessse d39b7b3e4f fix(droid): implement payload compaction for large droid histories 2025-12-25 05:44:57 +07:00
Luis Pater 8fee16aecd Merge PR #59: v6.6.50 (resolve conflicts) 2025-12-24 11:06:10 +08:00
hkfires e76ba0ede9 feat(logging): implement request ID tracking and propagation 2025-12-24 08:32:17 +08:00
Luis Pater e592a57458 Merge branch 'router-for-me:main' into main 2025-12-24 04:25:06 +08:00
Luis Pater f413feec61 refactor(handlers): streamline error and data channel handling in streaming logic
Improved consistency across OpenAI, Claude, and Gemini handlers by replacing initial `select` statement with a `for` loop for better readability and error-handling robustness.
2025-12-24 04:07:24 +08:00
gwizz 5bf89dd757 fix: keep streaming defaults legacy-safe 2025-12-23 00:53:18 +11:00
gwizz 4442574e53 fix: stop streaming loop on context cancel 2025-12-23 00:37:55 +11:00
gwizz 71a6dffbb6 fix: improve streaming bootstrap and forwarding 2025-12-22 23:34:23 +11:00
Luis Pater 5f65dd5bb4 Merge branch 'router-for-me:main' into main 2025-12-22 16:58:26 +08:00
moxi 830fd8eac2 Fix responses-format handling for chat completions 2025-12-22 13:54:02 +08:00
Finessse d44aadd1fc fix: address local UI guard and example executor 2025-12-20 06:03:11 +07:00
Luis Pater 40d78908ed Merge branch 'router-for-me:main' into main 2025-12-20 04:50:39 +08:00
Luis Pater 8a5db02165 Fixed: #607
refactor(config): re-export internal configuration types for SDK consumers
2025-12-20 04:49:02 +08:00
Finessse e76aacf5ec feat(executor): enhance Antigravity executor and handlers
- Add improvements to antigravity_executor.go for better CLI communication
- Update handlers.go with additional helper functions
2025-12-20 02:25:56 +07:00
Finessse 607abf2338 feat(sdk): update cliproxy auth and service modules 2025-12-19 18:18:48 +07:00
Finessse 15a2aa92ad models: add gemini-3-flash across providers 2025-12-18 19:31:20 +07:00
Finessse f022b151c2 openai: return JSON error envelopes 2025-12-18 16:49:45 +07:00
Finessse 626f501f49 droid: map custom: model ids to real model names 2025-12-18 16:32:08 +07:00
Finessse 358f7a6439 codex: synth SSE for huge/compaction responses with MAX_TOKENS retry 2025-12-18 14:18:28 +07:00
Finessse 99eb979353 models: add gemini-3-flash and gemini-3-pro-low (antigravity) 2025-12-18 14:17:57 +07:00
Finessse e2fe9f2403 auth: primary email override, trace headers, and cooldown reset 2025-12-18 01:43:07 +07:00
Finessse 72be557be8 middleware: keep tools for droid/factory 2025-12-17 20:34:06 +07:00
Finessse efb6965ef3 openai: treat Droid UA as agentic 2025-12-17 20:29:48 +07:00
Finessse e57cfdffb2 openai: inject default Factory tools 2025-12-17 20:29:17 +07:00
Finessse 944f70aedb factory: compact huge droid history + inject instructions 2025-12-17 20:14:01 +07:00
Finessse 1d2a9f6b5e factory: truncate oversized input_text 2025-12-17 20:01:56 +07:00
Finessse 1548b30abb openai: convert <tool_call> tags to function_call 2025-12-17 19:25:23 +07:00
Finessse d219b04b69 openai: enforce strict tool args 2025-12-17 19:18:06 +07:00
Finessse 0d6e1e6037 openai: stream errors to factory-cli as SSE 2025-12-17 17:37:51 +07:00
Finessse 52d5bd83f2 openai: return JSON error when streaming fails early 2025-12-17 17:06:49 +07:00
Finessse f9859ff6f3 fix(droid): strip non-JSON done sentinel from SSE 2025-12-17 14:19:23 +07:00