Add gpt-5.3-codex-spark to model service and config.
Also add gpt-5.3-codex to model service (was only in config).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Clients (e.g. opencode) may truncate conversation history in long sessions, leaving tool_use blocks without corresponding tool_result. The upstream Claude API strictly validates this pairing and returns 400. This adds _patchOrphanedToolUse() to claudeRelayService._processRequestBody(), which detects orphaned tool_use IDs and synthesizes error tool_result blocks — the same approach already used in anthropicGeminiBridgeService for the Antigravity path.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Clients (e.g. opencode) may truncate conversation history in long sessions, leaving tool_use blocks without corresponding tool_result. The upstream Claude API strictly validates this pairing and returns 400. This adds _patchOrphanedToolUse() to claudeRelayService._processRequestBody(), which detects orphaned tool_use IDs and synthesizes error tool_result blocks — the same approach already used in anthropicGeminiBridgeService for the Antigravity path.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Claude Console API (e.g., GLM accounts) does not accept messages with
role='system' in the messages array, returning 422 error:
"Input should be 'user' or 'assistant'"
This fix automatically transforms system messages by merging them into
the first user message's content, maintaining compatibility with clients
like opencode that send system role messages.
Changes:
- Add _transformSystemMessages() method to merge system content into user messages
- Apply transformation in both relayRequest() and relayStreamRequestWithUsageCapture()
- Only affects claude-console account type, no impact on official API
Fixes issues where opencode users get 422 errors when using Console API accounts.
- Remove Docker Hub dependency, use only GitHub Container Registry
- Update image naming logic for personal fork
- Simplify release notes to show GHCR images only
Google upstream (Antigravity) thinking models can take >45s during
the thinking phase before producing any output, especially under
heavy load. The 45s watchdog was incorrectly treating these as zombie
connections and terminating the stream, causing clients to receive
overloaded_error and retry repeatedly.
Increased STREAM_ACTIVITY_TIMEOUT_MS from 45000ms to 90000ms to
accommodate longer thinking phases.
When Claude Code sends a model with [1m] suffix (e.g. claude-opus-4-6[1m]),
the relay now adds 'context-1m-2025-08-07' to the anthropic_beta array in
the Bedrock request body. This enables the 1M context window preview on
Bedrock for supported models (Opus 4.6, Sonnet 4.5, Sonnet 4).
Per Anthropic docs: the 1M context requires the beta header on all
platforms including Amazon Bedrock.
- Add model mapping: claude-opus-4-6 → us.anthropic.claude-opus-4-6-v1
- Strip [1m] suffix before model lookup (Claude Code sends e.g.
claude-opus-4-6[1m] for 1M context variant)
- Bedrock supports 1M context natively for Opus 4.6, so the same
model ID works — the [1m] suffix just needs to be removed
Claude Code v2.1.38+ sends cache_control with a 'scope' field
(e.g. {type: 'ephemeral', scope: 'global'}) on system prompt blocks.
AWS Bedrock only accepts {type: 'ephemeral'} and rejects the extra
'scope' field with a ValidationException.
Added _sanitizeCacheControl() that recursively strips unsupported
fields from cache_control objects in system, messages, and tools
before forwarding to Bedrock.