Commit Graph

2139 Commits

Author SHA1 Message Date
hkfires
f9162d391c feat(executor): add image generation function tool checks and corresponding tests 2026-07-10 11:59:29 +08:00
Luis Pater
26d45fd46a feat(models): add model header overrides from configuration
- Introduced `override_header` in model configurations to support runtime customization of upstream request headers.
- Added `applyModelHeaderOverrides` utility to enforce header overrides for relevant executor and websocket paths.
- Updated model registry and `models.json` with enhanced configurations for header customizations.
- Implemented and extended test cases to validate header override behavior for various models and scenarios.
2026-07-10 05:30:12 +08:00
Luis Pater
5f8899b795 chore(models): remove GPT-5.6 Sol from model registry 2026-07-10 04:05:57 +08:00
Luis Pater
ef0a4a5643 feat(middleware): support logging for Codex response websockets
- Updated request logging middleware to include `/backend-api/codex/responses` as a valid websocket path.
- Enhanced unit tests to cover new websocket path scenarios.
2026-07-10 02:38:53 +08:00
Luis Pater
b4c594050e chore(models): update default client version and user agent, revise GPT-5.5 configurations
- Bumped the `defaultClientVersion` and `defaultCodexUserAgent` to `0.144.0`.
- Replaced GPT-5.6 Sol with GPT-5.5 in model registry, adjusting metadata including context window length and reasoning levels.
- Updated `usage_helpers` to include `cache_write_tokens` logic for input token details.
2026-07-10 01:54:37 +08:00
Luis Pater
f21beb05b5 feat(models): register additional GPT-5.6 models (Sol, Terra, Luna) to model registry
- Added detailed configurations for new models, including context length, reasoning levels, and supported parameters.
2026-07-10 01:01:11 +08:00
Luis Pater
445de6c055 feat(models): add GPT-5.6 models (Sol, Terra, Luna) to registry with enhanced capabilities
- Registered new GPT-5.6 models (Sol, Terra, Luna) with detailed configurations, including increased context length and advanced reasoning levels.
- Updated client model configurations and metadata for GPT-5.6 Sol in `codex_client_models.json`.
2026-07-10 00:59:41 +08:00
Luis Pater
db4f1ceff4 feat(validation): enhance cross-family level clamping with model type mismatch handling
- Added `modelFamilyMismatch` check to improve validation for provider families reusing Claude-compatible formats (e.g., Kimi models).
- Adjusted `allowClampUnsupported` logic to account for mismatched model families.
- Updated `strictBudget` validation to exclude mismatched model types.
- Added test cases to verify clamping behavior for Kimi models serving Claude-compatible requests.
2026-07-10 00:12:18 +08:00
Luis Pater
ee71dc52b7 feat(auth/models): implement Claude model ID prefix handling and plugin auth disabled state support
- Added `EnsureClaudeModelIDPrefix` and `ResolveClaudeModelIDPrefix` utilities for standardizing and decoding Claude model IDs.
- Updated handling of `claude-fable-5-dd-<reversed>` model IDs for request routing and response formatting.
- Incorporated logic to enforce disabled states for plugin virtual auths and their expanded children.
- Refactored code for applying and persisting disabled state metadata in plugin multi-auth scenarios.
- Implemented and extended unit tests to validate expected behavior.
2026-07-09 22:39:59 +08:00
Luis Pater
1204101ff2 feat(models): update zero_allowed thinking config to false in model registry 2026-07-09 15:19:23 +08:00
Luis Pater
d899c96239 feat(translator): map OpenAI max_tokens to Gemini's maxOutputTokens
- Added logic to convert OpenAI `max_tokens` and `max_completion_tokens` to `generationConfig.maxOutputTokens`.
- Implemented unit tests to validate proper mapping behavior, including precedence of `max_tokens` over `max_completion_tokens`.

Closes: #4108
2026-07-09 04:17:28 +08:00
Luis Pater
bea9567051 feat(translator): add cache control handling for responses and messages
- Introduced `AttachCacheControl` and `AttachMessageCacheControl` utilities for consistent cache control injection in content parts and messages.
- Updated Claude translator modules to preserve and apply cache control metadata for responses, messages, tools, and parts.
- Added unit tests to validate proper cache control behavior across multiple scenarios.

Closes: #4146
2026-07-09 04:02:51 +08:00
Luis Pater
3fd189262d feat(executor): integrate model registry for reasoning effort support in XAI
- Replaced hardcoded model allowlist with dynamic model registry metadata lookup.
- Enhanced `xaiSupportsReasoningEffort` to utilize metadata for reasoning capability validation.
- Updated `sanitizeXAIResponsesBody` to log reasoning effort stripping for unsupported models.
- Added unit tests to verify registry-based reasoning effort handling across models, including Grok 4.5.

Closes: #4147
2026-07-09 03:37:11 +08:00
Luis Pater
c612108645 feat(models): adjust thinking levels by removing "none" and "xhigh" options 2026-07-09 03:11:20 +08:00
Luis Pater
186c87ba6d feat(models): add xhigh targeting option to confidence level settings 2026-07-09 02:03:58 +08:00
Luis Pater
7c47edb141 feat(models): add Grok 4.5 to model registry with extended capabilities and context
- Registered Grok 4.5 with advanced agentic software and workflow task handling.
- Increased context length and max completion tokens for enhanced performance.
2026-07-09 01:49:56 +08:00
sususu98
4f2e19042c Update Antigravity hub user agent (#4142) 2026-07-08 16:47:37 +08:00
Luis Pater
cdccc72dfe fix(translator): resolve pending codex tool calls on terminal response 2026-07-08 05:25:34 +08:00
Luis Pater
505c59d8c9 fix(auth): prevent credential overwrites for team-scoped plans with account hashing
- Updated `CredentialFileName` to include trimmed `hashAccountID` for team-scoped plans.
- Added `isTeamScopedPlan` helper to handle plan-specific logic.
- Ensured filenames are unique across emails for multiple teams.

Closes: #4075
2026-07-08 04:50:56 +08:00
Luis Pater
14b139661d refactor(translator): simplify response logic and enhance thinking compatibility handling
- Consolidated thinking content block handling for improved clarity and efficiency.
- Unified `generationConfig` handling, including normalization of `thinkingConfig` settings.
- Added `applyOpenAIThinkingCompatibilityToAntigravity` for consistent reasoning and thought configuration compatibility.

Closes: #4067
2026-07-08 04:37:16 +08:00
Luis Pater
dea4787970 refactor(executor): centralize OpenAI stream usage handling with StreamUsageBuffer
- Introduced `StreamUsageBuffer` to encapsulate stream usage observation and publishing logic.
- Updated OpenAI-compatible executors and helpers to use `StreamUsageBuffer` for consistent stream usage tracking.
- Added unit tests to validate `StreamUsageBuffer` behavior, ensuring proper handling of usage details.

Closes: #4053
2026-07-08 04:01:22 +08:00
Luis Pater
4f157fbdff fix(executor): map message_too_big WebSocket errors to structured API responses
- Added `mapCodexWebsocketReadError` to handle `CloseMessageTooBig` errors with proper status and error code mapping.
- Updated error propagation and logging in Codex WebSocket executor.
- Introduced corresponding unit test to verify `message_too_big` error mapping in streamed responses.

Closes: #4017
2026-07-08 03:07:55 +08:00
Luis Pater
078ed1787b feat(openai): add support for input/output modalities in Codex client models
- Added handling of input/output modalities metadata for Codex and compatibility clients.
- Updated model registry and configurations to support "text" and "image" modalities.
- Introduced new tests to validate input/output modalities registration and processing.

Closes: #3976
2026-07-08 00:21:03 +08:00
Luis Pater
dc77bf4db3 feat(translator): enhance Claude tool response handling with structured content parsing
- Added `applyResponsesToolResultContent` to process and structure tool response content.
- Introduced conversion logic for text, image, and file parts in tool responses.
- Updated tests to validate correct handling of data URL images in tool response outputs.

Closes: #4116
2026-07-07 15:38:35 +08:00
Luis Pater
ab6ed392f2 test(executor): add unit test to validate complete SSE event passthrough in Claude executor
- Verified proper chunking and streaming of SSE events in `ExecuteStream`.
- Refactored executor to ensure complete SSE event delivery without partial fragments.

Closes: #4121
2026-07-07 15:23:02 +08:00
Luis Pater
8b9c4da245 feat(interactions): add support for Google Interactions
- Introduced API handlers and executor logic for Google Interactions
- Added request and response transformations for OpenAI and Claude Interactions.
- Integrated Gemini API with Interactions support.
- Updated tests to validate Interactions request parsing and error handling.
- Refactored translator logic for Interactions data flows.
2026-07-07 02:39:13 +08:00
Chén Mù
3ef74dce8f Merge pull request #4109 from router-for-me/websocket
feat(config): default enable WebsocketAuth in LoadConfigOptional and ParseConfigBytes
2026-07-04 10:58:56 +08:00
hkfires
4909493297 feat(config): default enable WebsocketAuth in LoadConfigOptional and ParseConfigBytes
Fixes #4015
2026-07-04 10:50:11 +08:00
hkfires
df08038941 fix: allow management access in example API key safe mode
Start the normal server when template api-keys are detected, but keep proxy API endpoints disabled until the keys are updated.

Show the warning page on / and /management.html, add a button to open the management panel via /management.html?safe-mode=configure, and remove the old warning-only server path.

Fixes #4063
2026-07-04 08:49:59 +08:00
Luis Pater
5afc0f1d5e fix(translator): remove temperature parameter handling in Claude request transformations
Closes: #4071
2026-07-04 00:36:58 +08:00
Luis Pater
e681910cbf Merge pull request #4069 from TooYoungTooSimp/patch-1
Improve reasoning content handling in response logic
2026-07-01 19:21:34 +08:00
Wolfgang Schoenberger
956ce7cf78 fix(registry): add Claude Sonnet 5 model metadata 2026-06-30 20:06:40 -07:00
TooYoungTooSimp
611d65eacc Improve reasoning content handling in response logic
Enhance reasoning content retrieval by falling back to 'reasoning' if 'reasoning_content' is absent or empty.
In some selfhosted openai-like server serving deepseek, the response.delta may contains reasoning rather than reasoning_content. So the client like codex does not recognize the thinking process.
2026-07-01 10:28:36 +08:00
Luis Pater
a26d38450e Merge pull request #4043 from sususu98/fix/responses-gemini-reasoning-signature-upstream-dev
fix(translator): OpenAI Responses reasoning signatures for Gemini
2026-06-29 15:58:40 +08:00
Luis Pater
8c8009c148 Merge pull request #4042 from router-for-me/plugin
feat(tests): refactor snapshot handling in model registration tests for improved clarity and consistency
2026-06-29 15:54:45 +08:00
sususu98
ca7478a1f4 fix(antigravity): align CLI User-Agent with agy 1.0.13 short form (#4045)
Use the aidev_client parenthetical suffix for default Antigravity UA and
route loadCodeAssist through the short UA. Keep onboardUser on the long UA
with google-api-nodejs-client.
2026-06-29 15:37:10 +08:00
sususu98
3648bc155e fix(translator): align reasoning merge with Responses visible text rules
Recognize model-visible output_text even when message.role is user, accept
assistant string content, and preserve raw merged text without trimming.
Always merge the adjacent visible item into native Gemini reasoning turns so
trailing output is not dropped by prefill stripping.
2026-06-29 13:56:57 +08:00
sususu98
4b51f85c4c fix(translator): map OpenAI Responses reasoning to Gemini two-part signatures
Build Gemini-native model contents for reasoning items when the routed model
uses the Gemini signature provider: thought summary on a thought part and the
replay signature on the adjacent visible part. Merge following assistant
visible text when it is not trailing prefill, and keep reasoning history when
stripping trailing model-authored prefill.

Extend Responses translator tests for signature compatibility and Antigravity
wrapper coverage; clarify stale replay signature expectations in executor tests.
2026-06-29 13:40:09 +08:00
hkfires
c48516c5d6 feat(tests): refactor snapshot handling in model registration tests for improved clarity and consistency 2026-06-29 11:54:26 +08:00
hkfires
caf70529e1 feat(pluginstore): refactor installation tests to improve asset download logic and error handling 2026-06-29 09:43:40 +08:00
hkfires
8970873156 feat(auth): streamline GitHub token handling and enhance download asset logic 2026-06-29 09:37:13 +08:00
hkfires
3ea7f18979 feat(pluginstore): add API URL to ReleaseAsset and update asset download logic 2026-06-29 08:59:50 +08:00
hkfires
00c0b4d74a feat(auth): refactor authentication handling for plugins and add tests 2026-06-29 06:41:04 +08:00
hkfires
60eae92bcd feat(plugins): enhance plugin deletion test and config handling 2026-06-28 22:14:36 +08:00
Luis Pater
884fc3ce94 Merge pull request #4035 from router-for-me/plugin
feat(pluginstore): introduce support for direct install type and version management
2026-06-28 21:34:57 +08:00
hkfires
1f16e87e1a feat(pluginstore): introduce support for direct install type and version management
- Added Manifest struct to encapsulate plugin metadata and installation details.
- Implemented ManifestFromRelease and ManifestFromPlugin functions for creating manifests from releases and plugins.
- Enhanced Plugin struct to include Versions and InstallPlan for direct installations.
- Introduced validation for direct install type, ensuring artifacts are correctly specified.
- Updated registry validation to support new schema version and direct install requirements.
- Added tests for parsing and validating direct install plugins, ensuring correct artifact handling.
2026-06-28 21:19:34 +08:00
Luis Pater
21d8164c56 feat(handlers): add disable-cooling support in OpenAI compatibility configuration
- Introduced `disable-cooling` field in OpenAI compatibility configurations.
- Updated `PatchOpenAICompat` to handle `disable-cooling` updates.
- Refined response structure in compatibility handlers to include `disable-cooling`.
- Added unit test to validate `disable-cooling` propagation in API responses.

Closes: #4023
2026-06-28 17:54:49 +08:00
Luis Pater
2fa4dabe93 feat(executor): improve downstream response ID rewrite and add test for repeated response scenarios 2026-06-26 16:34:02 +08:00
hkfires
6a59d645b5 feat(pluginhost): enhance plugin version management and logging for hot reload 2026-06-26 12:05:07 +08:00
Luis Pater
65f2288a4a feat(models): refine Gemini 3.5 Flash variants and add Medium tier
- Updated display names and descriptions of existing Gemini 3.5 Flash variants for better clarity.
- Introduced a new "Gemini 3.5 Flash (Medium)" variant with distinct configuration.
- Renamed "Low" tier to "Extra Low" for improved naming consistency.

Closes: #3949
2026-06-26 01:55:33 +08:00