201 Commits

Author SHA1 Message Date
Luis Pater
09179a707f feat(registry): add "max" level and remove deprecated Gemini models
- Added a new "max" level to model `thinking.levels` for enhanced customization.
- Removed deprecated Gemini 3 Pro (High/Low) models and associated fields from the registry.
- Simplified `thinking` attribute structure for `grok-build-0.1` and `grok-composer-2.5-fast` models.

Closes: #3901
2026-06-20 14:22:29 +08:00
Luis Pater
a79ae80f6e feat(registry): improve model fallback logic and refactor Claude model handling
- Replaced internal model-specific constants with exported defaults (`DefaultClaudeMaxInputTokens`, `DefaultClaudeMaxOutputTokens`).
- Refactored Claude model formatting to centralize schema application in `formatHomeClaudeModel`, with fields like `type`, `display_name`, and token limits.
- Added new unit tests for fallback behavior, metadata fields, and token handling in Claude and Gemini models.
- Removed deprecated test coverage for Amp provider model routes.

Closes: #3833
2026-06-20 13:09:44 +08:00
Luis Pater
b0ca3794ad Merge pull request #3834 from dcrdev/main 2026-06-20 12:56:25 +08:00
Luis Pater
041a065b2f Merge branch 'remove-gemini-cli' into dev
# Conflicts:
#	internal/api/handlers/management/auth_files.go
#	internal/thinking/provider/geminicli/apply.go
2026-06-19 14:40:29 +08:00
Luis Pater
ae6c5eaea5 feat(runtime): add support for gpt-image-1.5 and direct image API proxying
- Introduced the `gpt-image-2` model in Codex built-ins and updated visibility logic in the registry.
- Added direct proxy support for OpenAI image generation and editing endpoints.
- Implemented new execution paths for `/images/generations` and `/images/edit`, ensuring seamless handling for both JSON and multipart payloads.
- Expanded test coverage to validate the new model and direct proxy features, including streaming scenarios and error handling.
2026-06-19 00:06:12 +08:00
Luis Pater
78ba8ba731 chore: remove Gemini CLI-related translator packages and logic
- Deleted `geminicli` provider and related `Apply` logic.
- Removed all translator packages specific to Gemini CLI (Claude, Codex integrations).
- Purged associated test files for Gemini CLI translation.
- Removed `GeminiAuthenticator` and all associated authentication logic (OAuth flows, token handling, refresh logic).
- Deleted internal/executor Gemini OAuth support, including bearer token handling and runtime API logic.
- Purged all tests, configs, and command-line flags specific to Gemini OAuth flows.
- Updated documentation and aliases to reflect Gemini removal.
- Renamed `parseRetryDelay` to `ParseRetryDelay` and `deleteJSONField` to `DeleteJSONField`.
- Updated references in `antigravity_executor` and tests to use the new `helps` package.
- Adjusted import paths and test cases to ensure compatibility with the new location.
- Updated README files to reflect changes in the retry logic references.
- Updated `.github/ISSUE_TEMPLATE/bug_report.md` to remove deprecated Gemini CLI mention.
2026-06-18 13:33:10 +08:00
Dominic Robinson
1ed1f7b390 Merge branch 'dev' into main 2026-06-15 14:16:49 +01:00
Luis Pater
964e86f612 Merge pull request #3827 from iamkhalidbashir/add-kimi-k2.7-code
feat: add Kimi K2.7 Code model (kimi-k2.7-code)
2026-06-14 05:43:53 +08:00
Luis Pater
6d472d7b4f feat(models): increase context_length for Composer 2.5 Fast to 200,000 2026-06-14 02:27:08 +08:00
Dominic Robinson
e3301ecc98 fix(registry): Emit Claude model created_at as RFC 3339 string
Anthropic's List Models schema types created_at as an RFC 3339 datetime
string, but the Claude case of convertModelToMap emitted model.Created
as a Unix-timestamp integer. Format it with time.RFC3339 so the listing
matches the documented schema.
2026-06-13 16:15:45 +01:00
Dominic Robinson
f5484b0900 fix(registry): Conform Claude models listing to Anthropic API schema
Anthropic's List Models response (GET /v1/models) defines each model object
with id, display_name, max_input_tokens, max_tokens, created_at and type.
The Claude case of convertModelToMap emitted an incomplete object: it dropped
max_input_tokens and max_tokens entirely and omitted display_name whenever it
was unset, so the Anthropic-compatible listing did not match the schema it
emulates.

Emit max_input_tokens from ContextLength and max_tokens from
MaxCompletionTokens (the same registry metadata the Gemini case already
surfaces as inputTokenLimit/outputTokenLimit), with fallbacks, and always
emit display_name, falling back to the model ID.
2026-06-13 16:03:35 +01:00
Khalid Bashir
82235202fb feat: add Kimi K2.7 Code model (kimi-k2.7-code)
Add kimi-k2.7-code to the model registry with:
- 262K context length, 65K max completion tokens
- Thinking support (dynamic, 1024-32000 budget)
- zero_allowed=false (K2.7 Code does not support non-thinking mode)

Closes #3826
2026-06-13 13:14:16 +05:00
sususu98
48dcadd9ef feat(antigravity): bridge Claude WebSearch to native googleSearch
Add a native Antigravity WebSearch path for Claude typed WebSearch requests.

Detect Claude Messages requests whose tools are only typed WebSearch tools
(web_search_20250305 / web_search_20260209), and convert them into an
Antigravity requestType=web_search payload instead of sending the request
through the normal tool-calling path.

Preserve the user's requested model. The native path is enabled only when that
Antigravity model is known to support Google Search. Capability data fetched
from Antigravity model info is used only as an enhancement to the local model
registry, not as a replacement for the existing registry fallback behavior.
Unsupported models keep the existing Antigravity request behavior and are not
silently rerouted to another web-search-capable model.

Translate Claude WebSearch request options to the verified Antigravity
googleSearch shape:
- max_uses -> googleSearch.enhancedContent.imageSearch.maxResultCount
- allowed_domains -> googleSearch.includedDomains

Leave blocked_domains and user_location unmapped because the Antigravity
googleSearch request shape has no verified equivalent for them. This avoids
sending speculative fields or pretending unsupported Claude WebSearch options
are enforced upstream.

Translate Antigravity web-search responses back into Claude-compatible output:
server_tool_use blocks, web_search_tool_result blocks, cited text blocks,
grounding URLs, and usage-compatible stream/non-stream responses.

Cover the behavior with tests for request conversion, response conversion,
grounding URL resolution, domain filter mapping, fetched capability hints,
excluded-model handling, and unsupported-model behavior.
2026-06-13 10:07:48 +08:00
Luis Pater
efd69d8ece feat(models): add Claude Fable 5 to registry
- Added new model `Claude Fable 5` to `models.json` with enhanced reasoning and long-horizon capabilities.
- Included detailed parameters such as context length, max completion tokens, and thinking level configurations.
2026-06-10 02:38:04 +08:00
Luis Pater
d625caddd9 feat(pluginhost): add capabilities for command-line flag handling and plugin execution
- Implemented command-line flag registration and execution for plugins with priority-based conflict resolution.
- Enabled plugin-owned command-line flag execution and persistence of plugin-auth data.
- Added new `Host` methods to support command-line capabilities, including flag normalization, validation, and execution state management.
- Introduced unit tests to ensure coverage for command-line plugin functionality, including auth data persistence.
- Updated configs to normalize plugins during initialization.
2026-06-06 18:35:17 +08:00
Luis Pater
87d813c56c chore(models): remove legacy GPT 5.2 and GPT 5.3 Codex entries from registry
- Cleaned up outdated GPT 5.2 and GPT 5.3 Codex model configurations from `models.json`.
- Simplified registry by removing unused model references across all tiers (`codex-team`, `codex-plus`, `codex-pro`).
2026-06-02 10:41:12 +08:00
Luis Pater
bf04a24221 feat(models): add support for grok-composer-2.5-fast model
- Introduced `grok-composer-2.5-fast` as a new XAI model.
- Updated registry to include display name, description, and configuration details for the new model.
- Enabled support for the model in the Responses API.
2026-06-02 08:50:32 +08:00
Luis Pater
fb4f39d300 test(models, executor): add XAI video model test and fix Codex User-Agent assertions 2026-06-01 02:59:31 +08:00
Luis Pater
ac1360f479 feat(models): add support for grok-imagine-video-1.5-preview model
- Introduced `grok-imagine-video-1.5-preview` as a new XAI video model.
- Updated handlers, registry, and validation logic to include support for the new model.
- Enhanced test coverage to validate integration and functionality of the preview model.
2026-06-01 02:56:15 +08:00
Luis Pater
df0176a188 feat(models): add Claude Opus 4.8 model to registry 2026-05-29 01:22:46 +08:00
Luis Pater
d9c01a638d chore(models): remove deprecated GPT-5.x models from codex-free catalog 2026-05-28 09:41:51 +08:00
Luis Pater
aaec9194d5 feat(models): add Grok Build 0.1 to registry
- Registered `grok-build-0.1` model with enhanced context length and agentic engineering support.
- Supports dynamic thinking levels for improved software workflows.
2026-05-23 22:49:36 +08:00
hkfires
3c62a9a9b0 fix(auth): update import paths to v7 for registry and executor 2026-05-21 10:00:22 +08:00
Luis Pater
0ec07e57dd feat(models): add Gemini 3.5 Flash to registry with enhanced thinking capabilities
- Registered `gemini-3.5-flash` model with dynamic thinking levels and extended token limits.
- Supports multiple generation methods, including cached and batch content creation.
2026-05-20 10:53:31 +08:00
Luis Pater
fdffe49974 feat(models): register Gemini 3.5 Flash with dynamic thinking levels
- Added new model `gemini-3.5-flash` to the registry with enhanced intelligence and speed capabilities.
- Supports extended thinking levels (`minimal`, `low`, `medium`, `high`) and dynamic adjustments.
- Expanded generation methods, including content creation and token counting.
2026-05-20 10:50:02 +08:00
Luis Pater
ea25949479 feat(models): add Gemini 3.5 Flash models to registry
- Registered new models: `gemini-3-flash-agent` and `gemini-3.5-flash-low` with detailed specifications.
- Includes support for dynamic thinking levels and extended context capabilities.
2026-05-20 02:17:49 +08:00
Luis Pater
feebe6c7f2 feat(api): add OpenAI compatibility for image models
- Introduced OpenAI-compatible image model support in the API, enabling integration through image generation and editing endpoints.
- Added registry type for OpenAIImageModelType to classify and validate compatibility.
- Implemented request handling for OpenAI-compatible image models, including JSON and multipart formats.
- Enhanced executor methods to support OpenAI-compatible image streaming and non-streaming requests.
- Included tests to validate model registration, streaming behavior, and multipart payload formatting.
2026-05-19 10:13:26 +08:00
Luis Pater
be841b88ee log(registry): replace panic with warning on embedded model parse failure 2026-05-17 15:10:48 +08:00
Luis Pater
74cb53dee1 feat(xai): support namespace tools and enhance tool normalization logic
- Added `namespace` tool type support, enabling nested tools to be normalized and moved to the top level.
- Refactored tool normalization logic into `normalizeXAITool` for reusability and clarity.
- Updated `xai_executor` test cases to validate namespace tool handling and nested tool normalization.
2026-05-17 15:02:36 +08:00
Luis Pater
96754f5a33 refactor(api): move Codex client model handling to registry package
- Relocated Codex client model JSON and related logic from `openai` package to `registry` for better modularity.
- Updated references to use `registry.GetCodexClientModelsJSON()` in loading logic.
- Extended test cases to cover additional field removals (`upgrade`, `availability_nux`).
2026-05-17 05:11:41 +08:00
Luis Pater
53d1fd6c5c feat(api, xai): add xAI Grok video model support with API integration
- Introduced new xAI `grok-imagine-video` model for video generation with configurable options (e.g., duration, size, resolution).
- Implemented video-specific API endpoints (`/v1/videos`, `/v1/videos/generations`, `/v1/videos/edits`, `/v1/videos/extensions`), including request validation and model handling.
- Enhanced model registry with `xaiBuiltinVideoModelID` and metadata for video capabilities.
- Added unit tests to validate video model support, request structures, and API response handling.
- Extended `XAIExecutor` to integrate video generation and retrieval via runtime requests.
2026-05-17 02:53:50 +08:00
Luis Pater
2ff9e33e26 feat(api, xai): integrate xAI Grok image models and extend API endpoints for image support
- Added new xAI Grok image models (`grok-imagine-image`, `grok-imagine-image-quality`) with high-fidelity and aspect ratio configurations.
- Extended `isSupportedImagesModel` logic to validate xAI models.
- Implemented API request builders for image generation/editing with customizable options (e.g., resolution, aspect ratio, response format).
- Enhanced `/v1/images` endpoints to handle xAI model capabilities, including response normalization and model-specific handlers.
- Updated unit tests to validate xAI model validation, request structure, and API integration.
2026-05-17 01:30:23 +08:00
Luis Pater
e4c957078c feat(auth): add OAuth2 support for xAI with PKCE and token persistence
- Implemented xAI OAuth2 integration with PKCE (Proof Key for Code Exchange) support.
- Added logic for token exchange, refresh, and persistent storage in JSON format.
- Created `xai` package with helpers for OAuth discovery, API token handling, and URL building.
- Introduced `XAIExecutor` for integrating xAI credentials into runtime HTTP requests.
- Added unit tests to validate OAuth flow, token persistence, and endpoint validation.
2026-05-17 01:02:35 +08:00
Luis Pater
e50cabac4b chore: upgrade CLIProxyAPI dependency to v7 across the project
- Updated all references from v6 to v7 for `github.com/router-for-me/CLIProxyAPI`.
- Ensured consistency in imports within core libraries, tests, and integration tests.
- Added missing tests for new features in Redis Protocol integration.
2026-05-08 11:46:46 +08:00
Luis Pater
2ea8f77efb feat(models): add GPT-5.5 to the registry with support for advanced tasks 2026-04-29 09:49:26 +08:00
Luis Pater
736ae61e4a Merge pull request #3051 from philipbankier/fix/gpt55-free-tier-test
fix(test): remove free tier from GPT-5.5 inclusion test
2026-04-26 22:35:59 +08:00
philipbankier
32ef1588e8 fix(test): remove free tier from GPT-5.5 inclusion test
GPT-5.5 was correctly removed from codex-free tier in 7b89583c
(since free accounts cannot access it), but the test was not updated
to reflect this. This caused TestCodexStaticModelsIncludeGPT55 to
fail on the free subtest.

Changes:
- Remove free tier from GPT-5.5 inclusion test
- Add new TestCodexFreeModelsExcludeGPT55 to explicitly verify
  that free tier does NOT include GPT-5.5
2026-04-25 22:11:08 -04:00
Luis Pater
ea670ef8c0 feat(models): add Codex Auto Review model entry to registry JSON
Closes: #2995
2026-04-26 03:09:06 +08:00
Luis Pater
7b89583cf8 chore(models): remove GPT-5.5 model entry from registry JSON 2026-04-24 05:07:03 +08:00
Ben Vargas
736018a0b0 Add GPT-5.5 Codex model support 2026-04-23 13:43:02 -06:00
Luis Pater
7d5f6d9382 feat(models): add GPT-5.5 model entry to registry JSON 2026-04-24 02:43:12 +08:00
Luis Pater
e935196df4 feat(models): add hardcoded GPT-Image-2 model support in Codex
- Added `GPT-Image-2` as a built-in model to avoid dependency on remote updates for Codex.
- Updated model tier functions (`CodexFree`, `CodexTeam`, etc.) to include built-in models via `WithCodexBuiltins`.
- Introduced new handlers for image generation and edit operations under `OpenAIAPIHandler`.
- Extended tests to validate 503 response for unsupported image model requests.
2026-04-22 20:51:13 +08:00
Luis Pater
4fc2c619fb feat(models): add Kimi K2.6 model entry to registry JSON 2026-04-21 20:53:03 +08:00
hkfires
d9a3b3e5f3 fix(tests): update model lookup references and enhance Claude executor tests 2026-04-17 08:32:07 +08:00
Luis Pater
5dcca69e8c feat(models): add Claude Opus 4.7 model entry to registry JSON 2026-04-17 01:08:19 +08:00
Luis Pater
f5dc6483d5 chore: remove iFlow-related modules and dependencies
- Deleted `iflow` provider implementation, including thinking configuration (`apply.go`) and authentication modules.
- Removed iFlow-specific tests, executors, and helpers across SDK and internal components.
- Updated all references to exclude iFlow functionality.
2026-04-17 01:07:12 +08:00
Luis Pater
a4c1e32ff6 chore(models): remove outdated GPT-5 and related model entries from registry JSON 2026-04-15 20:37:32 +08:00
Luis Pater
8fac29631d chore: remove Qwen support from SDK and internal components
- Deleted `QwenAuthenticator`, internal `qwen_auth`, and `qwen_executor` implementations.
- Removed all Qwen-related OAuth flows, token handling, and execution logic.
- Cleaned up dependencies and references to Qwen across the codebase.
2026-04-15 12:16:08 +08:00
Luis Pater
a824e7cd0b feat(models): add GPT-5.3, GPT-5.4, and GPT-5.4-mini with enhanced "thinking" levels 2026-04-03 23:05:10 +08:00
hkfires
fee736933b feat(openai-compat): add per-model thinking support 2026-03-24 14:21:12 +08:00