Commit Graph
318 Commits
Author SHA1 Message Date
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
FinessseandClaude Opus 4.5 f52840b10e Merge remote-tracking branch 'origin/main'
Resolve conflicts:
- Keep Kiro executor (was deleted in remote)
- Merge antigravity executor changes (0.7 safety factor, new model names)
- Keep Kiro management API, remove broken Copilot function
- Fix Kiro translator imports

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 01:02:29 +07:00
FinessseandClaude Opus 4.5 c141565eae feat(management): add Kiro OAuth support
Add Kiro OAuth handling in management API:
- Fix ExpiresAt field name in KiroTokenStorage

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 00:54:14 +07:00
Luis Pater 8e24d9dc34 Merge branch 'main' into plus 2025-12-25 21:07:37 +08:00
Luis Pater 443c4538bb feat(config): add commercial-mode to optimize HTTP middleware for lower memory usage 2025-12-25 21:05:01 +08:00
Finessse 5d2848d951 feat(integrations): implement tool auto-configuration system 2025-12-25 05:46:37 +07:00
Finessse 2f43e94ec2 feat(oauth): add support for manual callback URL entry 2025-12-25 05:45:19 +07:00
Luis Pater cdb9c2e6e8 Merge remote-tracking branch 'origin/main' into router-for-me/main 2025-12-24 20:18:53 +08:00
hkfires 2a6d8b78d4 feat(api): add endpoint to retrieve request logs by ID 2025-12-24 19:24:51 +08:00
hkfires 26fbb77901 refactor(sdk/auth): rename manager.go to conductor.go 2025-12-24 15:21:03 +08: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
altamash 0c0aae1eac Robust change detection: replaced string concat with struct-based compare in hasModelMappingsChanged; removed boolTo01.
•  Performance: pre-allocate map and regex slice capacities in UpdateMappings.
   •  Verified with amp module tests (all passing)
2025-12-23 18:52:28 +05:30
altamash 5dcf7cb846 feat: regex support for model-mappings 2025-12-23 18:41:58 +05:30
Luis Pater e755e567ea Merge branch 'router-for-me:main' into main 2025-12-21 19:54:13 +08:00
Luis Pater dbcbe48ead Merge pull request #641 from router-for-me/url-OAuth-add-ter
OAuth and management
2025-12-21 17:25:24 +08:00
Luis Pater db491c8f9b Merge branch 'router-for-me:main' into main 2025-12-21 16:19:04 +08:00
hkfires 3fc410a253 fix(amp): add /settings routes to proxy 2025-12-21 12:51:35 +08:00
Supra4E8C 781bc1521b fix(oauth): prevent stale session timeouts after login
- stop callback forwarders by instance to avoid cross-session shutdowns
  - clear pending sessions for a provider after successful auth
2025-12-21 10:48:40 +08:00
Supra4E8C 24970baa57 management: allow prefix updates in provider PATCH handlers 2025-12-21 02:14:28 +08:00
Luis Pater 5418bbc338 Merge branch 'router-for-me:main' into main 2025-12-20 23:40:09 +08:00
Luis Pater ed5ec5b55c feat(amp): enhance model mapping and Gemini thinking configuration
This commit introduces several improvements to the AMP (Advanced Model Proxy) module:

- **Model Mapping Logic:** The `FallbackHandler` now uses a more robust approach for model mapping. It includes the extraction and preservation of dynamic "thinking suffixes" (e.g., `(xhigh)`) during mapping, ensuring that these configurations are correctly applied to the mapped model. A new `resolveMappedModel` function centralizes this logic for cleaner code.
- **ModelMapper Verification:** The `ModelMapper` in `model_mapping.go` now verifies that the target model of a mapping has available providers *after* normalizing it. This prevents mappings to non-existent or unresolvable models.
- **Gemini Thinking Configuration Cleanup:** In `gemini_thinking.go`, unnecessary `generationConfig.thinkingConfig.include_thoughts` and `generationConfig.thinkingConfig.thinkingBudget` fields are now deleted from the request body when applying Gemini thinking levels. This prevents potential conflicts or redundant configurations.
- **Testing:** A new test case `TestModelMapper_MapModel_TargetWithThinkingSuffix` has been added to `model_mapping_test.go` to specifically cover the preservation of thinking suffixes during model mapping.
2025-12-20 22:19:35 +08:00
Supra4E8C 93414f1baa feat (auth): CLI OAuth supports pasting callback URLs to complete login
- Added callback URL resolution and terminal prompt logic
  - Codex/Claude/iFlow/Antigravity/Gemini login supports callback URL or local callback completion
  - Update Gemini login option signature and manager call
  - CLI default prompt function is compatible with null input to continue waiting
2025-12-20 18:25:55 +08:00
Luis Pater 8fac6b147a Merge branch 'router-for-me:main' into main 2025-12-20 17:13:30 +08:00
Luis Pater 10f8c795ac Merge pull request #634 from router-for-me/amp
fix(amp): add /docs routes to proxy
2025-12-20 17:08:07 +08:00
Finessse 5c464f116f management: add semantic health, toggles, export-all 2025-12-20 15:48:13 +07:00
Finessse 1a405d7976 middleware: add rate limits and semantic truncation 2025-12-20 15:47:50 +07:00
Finessse ff7088ee8f management: add memory endpoints 2025-12-20 15:01:05 +07:00
Finessse d96d9e0b8e middleware: update agentic memory pipeline 2025-12-20 15:00:46 +07:00
Luis Pater 3e4858a624 feat(config): add log file size limit configuration #535
This commit introduces a new configuration option `logs-max-total-size-mb` that allows users to set a maximum total size (in MB) for log files in the logs directory. When this limit is exceeded, the oldest log files will be automatically deleted to stay within the specified size. Setting this value to 0 (the default) disables this feature. This change enhances log management by preventing excessive disk space usage.
2025-12-20 15:52:59 +08:00
hkfires c84ff42bcd fix(amp): add /docs routes to proxy 2025-12-20 10:15:25 +08:00
Finessse d44aadd1fc fix: address local UI guard and example executor 2025-12-20 06:03:11 +07:00
Finessse 348609a93f feat: merge management UI into app 2025-12-20 05:58:35 +07:00
Finessse 33cf877a15 feat: add scaffolded prompt state and semantic memory 2025-12-20 05:58:08 +07:00
Finessse 40722131ee feat: add agentic harness middleware 2025-12-20 05:47:56 +07:00
Finessse e505267093 chore: remove temporary reproduction scripts
Deletes repro_merge.go and test_gjson.go which were likely used for debugging or testing during development.
2025-12-20 04:02:08 +07:00
Finessse ae506ce66e feat(api): add AgenticHarnessMiddleware for long-running agent support
Implements a new middleware to handle agentic headers and dynamically inject system prompts for 'Initializer' and 'Coding' agents. Also registers this middleware in the server setup.
2025-12-20 04:01:32 +07:00
Finessse f019f43879 feat(middleware): add Claude Code CLI support and diagnostic headers
- Add claude-cli detection to isAgenticCLI and mustKeepTools checks
- Add /v1/messages Claude Messages API format support
- Implement trimClaudeMessagesWithMemory with tool_use/tool_result adjacency preservation
- Add extractLastUserTextFromClaude, extractTextFromClaudeMessage, truncateClaudeMessageContent helpers
- Add claude case to prependToLastUserText, appendToLastUserText, extractPinnedContext
- Add response headers for localhost diagnostics:
  - X-ProxyPilot-Session: session ID
  - X-ProxyPilot-Request-Shape: detected format (chat/responses/claude)
  - X-ProxyPilot-Memory-Stored: dropped message count
  - X-ProxyPilot-Memory-Retrieved: injected snippet count
2025-12-20 02:24:56 +07:00
Finessse b8f6781bb8 feat(runtime): update executor and runtime internals 2025-12-19 18:18:40 +07:00
Luis Pater 44f66d2257 Merge PR #55 2025-12-19 18:59:12 +08:00
Luis Pater 99478d13a8 Merge pull request #623 from router-for-me/remote-OAuth
Remote OAuth
2025-12-19 18:29:09 +08:00
hkfires 9d9b9e7a0d fix(amp): add management auth skipper 2025-12-19 13:57:47 +08:00
Supra4E8C 1b358c931c fix: restore get-auth-status ok fallback and document it 2025-12-19 12:15:22 +08:00
Supra4E8C cfa8ddb59f feat(oauth): add remote OAuth callback support with session management
Introduce a centralized OAuth session store with TTL-based expiration
  to replace the previous simple map-based status tracking. Add a new
  /api/oauth/callback endpoint that allows remote clients to relay OAuth
  callback data back to the CLI proxy, enabling OAuth flows when the
  callback cannot reach the local machine directly.

  - Add oauth_sessions.go with thread-safe session store and validation
  - Add oauth_callback.go with POST handler for remote callback relay
  - Refactor auth_files.go to use new session management APIs
  - Register new callback route in server.go
2025-12-19 00:38:29 +08:00
Finessse 57473ec3c6 proxypilot: default management UI language to en 2025-12-18 18:25:06 +07:00
Finessse c2118c28c9 proxypilot: prefer proxypilot-engine + renamed launcher logs 2025-12-18 17:20:25 +07:00
Finessse 428b1f04c1 server: decompress gzip request bodies 2025-12-18 16:49:37 +07:00
Finessse 893c43ae30 agentic: preserve tool call/result pairs when trimming chat payloads 2025-12-18 16:12:01 +07:00
Finessse 70dd0cd283 api: add ProxyPilot local dashboard and diagnostics endpoints 2025-12-18 14:17:36 +07:00
Finessse 3336d15282 management: apply ProxyPilot branding at serve-time 2025-12-18 01:58:28 +07:00