- Refactored `xaiFunctionParametersNeedSimplification` to identify schemas xAI cannot process, including those with non-object types in unions.
- Limited parameter simplifications to problematic schemas instead of specific tools or namespaces.
- Clarified and updated debug messages to reflect schema rejection and hang prevention.
Closes: #4343
- Updated git operations to leverage `ClientOptions` for authentication and configuration, replacing the deprecated `AuthMethod`.
- Implemented logic to disable GPG commit signing in repositories to prevent signature errors in automated workflows.
- Upgraded dependencies in `go.mod` and `go.sum` to align with the latest `github.com/go-git/go-git/v6` alpha releases.
- Added unit tests to verify commit signing is properly disabled in repositories.
Closes: #4341
Propagate client generate metadata through usage records while keeping
legacy callers that omit the field enabled by default. Preserve an
existing context generate=false when metadata does not set the value,
and normalize omission to true only at publishing boundaries.
- Introduced `SanitizedFunctionNameMap` and `DisambiguatedToolNameMap` for consistent mapping between sanitized and original tool names.
- Added collision handling with deterministic hash suffixes for name disambiguation within character limits.
- Implemented logic to deduplicate and map tool and function names across translator components, including Interactions, Claude, and Gemini.
- Updated test cases to validate name restoration, deduplication, disambiguation, and mapping behaviors.
Closes: #4244
- Introduced support for custom tool calls in request serialization, including preservation of call IDs, input, and output.
- Enhanced tool call batching logic to handle ambiguous, missing, and reused call IDs across assistant messages.
- Updated processing of tool call outputs to ensure proper matching with pending calls and introduced synthesized IDs when necessary.
- Added extensive test cases to validate behavior for custom tool call histories, mixed call types, and edge cases with ambiguous or orphaned IDs.
Closes: #4256
- Introduced `deferredRequestBodyCapture` for spooling and retaining large error-only request bodies for improved logging.
- Enhanced `RequestLoggingMiddleware` to capture request body based on size and error criteria.
- Implemented decompression and truncation for large request bodies with Zstd encoding.
- Added support for deferred API request logging and context tracking.
- Included extensive test coverage for error-specific body capture and serialization behavior.
- Added support for reasoning content in assistant messages with proper serialization of `thought`, `thoughtSignature`, and content parts.
- Ensured empty assistant messages and invalid function calls are skipped during request generation.
- Enhanced compatibility by adding test cases for preserving reasoning content, tool calls, and visible assistant content in `ConvertOpenAIRequestToGemini` and `ConvertOpenAIRequestToAntigravity`.
Closes: #4304
- Implemented `SelectAuthByKind` to filter and select credentials by kind with retry logic and error handling.
- Updated Codex Alpha Search to enforce OAuth credentials and sanitize upstream request body.
- Added unit tests to validate `SelectAuthByKind` behavior across scenarios.
- Introduced `sanitizeCodexAlphaSearchBody` for removing sensitive fields from API payloads.
Closes#4289
- Implemented `homeForceMappingAliasResult` for handling forced alias mapping in the authentication process.
- Updated `resolveExecutionAliasResultForRequested` to incorporate home force mapping.
- Introduced new attributes (`home_force_mapping` and `home_original_alias`) for managing alias behavior.
- Extended `homeAuthDispatchResponse` with fields for force mapping and original alias.
- Added test cases to validate force mapping logic and edge cases.
* fix(usage): preserve request service tier metadata
* fix(usage): collapse request tier metadata
* fix(usage): emit only service_tier and response_service_tier
Collapse request tier to service_tier for usage records and queue payloads. Keep RequestServiceTier as a deprecated input-only alias for older plugin callers.
Normalize and drop tool_choice entries that reference tools removed by
normalizeXAITools before injecting native x_search, then allow x_search in
allowed_tools without duplicates so Grok can select the injected tool.
- Introduced `xai-api-key` to configuration for supporting xAI provider integration.
- Added API key operations: creation, updates, deletion, and sanitization.
- Implemented backend enhancements for credential-specific routing, response filtering with model aliasing, and WebSocket handling for xAI services.
- Included extensive test coverage to validate configuration parsing, CRUD operations, and the new functionalities.
- Updated related modules to handle `xai-api-key`, including the watcher, management handlers, and configuration sanitizers.
- Added `clientDeclaredTools` to `xaiInternalXSearchResponseFilter` for improved filtering precision.
- Implemented `collectXAIClientDeclaredToolKeys` to register client-declared tools with effective normalization to function calls.
- Prevented leakage of internal traces (e.g., `xs_call-*`) while preserving client-declared tools with overlapping names.
- Introduced multiple test cases to ensure filter correctness and preserve expected WebSocket response outputs.
- Enhanced completed output handling in response filtering.
Closes: #4282 / PR #4284.
* fix(executor): strip orphan reasoning ids when store is disabled
Codex backend requires store=false and treats reasoning items with an
id but no usable encrypted_content as store lookups, which 404 with
"Item with id not found". Drop those orphan ids after removing invalid
encrypted_content (and when encrypted_content is already missing),
while preserving ids when store=true.
* fix(executor): skip id delete when reasoning item has no id
Avoid sjson.Delete on encrypted_content drops that never carried an id,
matching the orphan-id path's Exists() guard.
Previously each dropped encrypted_content re-ran sjson.DeleteBytes on
the whole body/array per item, causing O(n^2) work on inputs with many
reasoning items.
Now the array is walked once, editing only offending items in place
and lazily building a replacement "input" array via strings.Builder.
The builder stays nil (no allocation) when nothing needs sanitizing,
and the array is spliced back with a single SetRawBytes call.
- Introduced logo assets (`Kimi`, `OpenAI`, `Claude`, `Gemini`, `Grok`) under `assets/logo/`.
- Updated multilingual README files (`README.md`, `README_JA.md`, `README_CN.md`) to include provider SVG logos and enhance descriptions for supported APIs.
- Improved clarity of provider details with tables for better readability.
Load codex_client_models.json like models.json with validation, revisioned
handler reloads, CI bake, and Home-aware updater gates so list IDs still
come from Home while templates can refresh on the edge.
xAI Responses does not accept namespace tool containers, so the executor flattens nested tools before forwarding them upstream. The original namespace support in 8b3670b8 moved children to the top level but discarded their namespace identity; ca67caf later retained namespace context only for targeted schema simplification.
Qualify flattened names to avoid collisions, normalize namespaced function-call history, and restore name plus namespace on HTTP and WebSocket responses. This keeps Codex MCP routing intact without changing the existing xAI tool_search filtering policy.
- Introduced `codexSearchGinContextSelector` to capture and validate Gin context during credential selection.
- Added test case to verify context propagation and query parameter usage (`TestCodexAlphaSearchPassesGinContextToAuthSelection`).
- Updated `SelectAuth` implementation to include Gin context for enhanced compatibility with Home scheduling.
Preserve include=reasoning.encrypted_content, cache reasoning+assistant message
for store:false multi-turn, and accept Grok thinking signatures on Claude→Codex
for grok targets.
Harden replay cache: blob-level reasoning filter, never double-inject assistant
when history has a last message, isolate session keys by downstream API key,
clear cache on non-replayable completed turns, and normalize refusal parts.