Commit Graph

3659 Commits

Author SHA1 Message Date
Luis Pater
9dfddd613d fix(aistudio): normalize thinking level to uppercase
- Normalize `generationConfig.thinkingConfig.thinkingLevel` to canonical uppercase enum values (`MINIMAL`, `LOW`, `MEDIUM`, `HIGH`).
- Prevent upstream HTTP 400 invalid argument errors caused by case-sensitive validation.

Closes: #5481
2026-09-06 04:14:41 +08:00
Luis Pater
31ec43621b chore(models): remove gpt-5.4 and gpt-5.4-mini models
- Remove `gpt-5.4` and `gpt-5.4-mini` specifications from registry models.
- Remove deprecated `gpt-5.4` configuration from Codex client models.
2026-09-06 03:56:06 +08:00
Luis Pater
5208aec703 fix(codex): preserve empty supported_reasoning_levels array
- Retain `supported_reasoning_levels` as an empty array instead of deleting the key when no reasoning levels are supported or compatible.
- Continue deleting `default_reasoning_level` when reasoning levels are empty.
v7.2.151
2026-09-05 04:01:25 +08:00
Luis Pater
c77b136943 feat(models): add gpt-6-astra model and update codex client configurations
- Add `gpt-6-astra` model specifications and capabilities to registry models.
- Update Codex client models configuration and instructions for `gpt-6-astra`.
- Bump default Codex client version and user-agent to `0.153.3` in model fetcher tool.
v7.2.150
2026-09-05 03:35:14 +08:00
rome-xi
acf919ce50 perf(antigravity): batch reasoning replay mutations 2026-09-04 18:53:21 +08:00
sususu
f6d19a329c fix(gemini): ensure functionResponse normalizes to user role in Gemini request normalizer 2026-09-04 18:21:37 +08:00
sususu
f2041a2c78 fix(antigravity): use ContentHasGeminiFunctionResponse instead of gjson projection 2026-09-04 18:21:37 +08:00
sususu
e56fae88c0 fix(translator): flush pending developer notice before intervening user turn 2026-09-04 18:21:37 +08:00
sususu
0fe19ede90 fix(translator): preserve Gemini prompt cache by demoting mid-session developer messages (#5490)
- Responses API: only hoist developer/system messages before conversation starts to systemInstruction, keeping token 0 cache prefix immutable. Demote mid-session developer messages to user role and merge consecutive user turns via MergeAdjacentGeminiUserContents without crossing functionResponse boundaries.
- Tool Call Buffer: buffer mid-session developer messages during pending function calls and emit after functionResponse, preserving valid tool pairing and reason replay.
- Chat Completions API: apply the same leading/mid-session distinction for system/developer messages and guard against empty parts.
- Claude Messages API: align role: "developer" in messages with role: "system", demoting to <system-reminder> user turns and avoiding upstream 400s.
- Validation: update ValidateGeminiFunctionCallPairing to allow intervening user turns before functionResponse, matching upstream Antigravity tolerance.
- Role Normalization: ensure functionResponse turns in Antigravity are always normalized to role: "user".
2026-09-04 18:21:37 +08:00
sususu
4a5ab534f8 feat(claude): harden probe and helper request classification, diagnostics isolation, and late cloaking
- Require exactly one non-reminder text block matching quota/test/probe/./Hi for probe request matching.
- Identify title helper requests via expanded session title patterns.
- Implement post-payload bidirectional probe reclassification: strip CPA diagnostics and billing tags on probes, while restoring continuity if declassified.
- Preserve caller-owned and payload-supplied diagnostics on probe requests.
- Gate late sensitive-word obfuscation strictly on cloaked requests in Execute and ExecuteStream.
- Add comprehensive end-to-end tests for probe classification, diagnostics isolation, and late cloaking.
2026-09-04 15:23:31 +08:00
sususu
de4aa60028 feat(claude): add Fable 5.1 reporting outcomes block and post-payload reconciliation
- Inject '# Reporting outcomes' system block for Fable 5.1 / Mythos 5.1 models matching Claude Code 2.1.258 tengu_dapper_lagoon behavior.
- Support both string-format and block-array system prompts for Fable reporting injection.
- Add reconcileClaudeCodeFableModelAfterPayload to reconcile model additions when payload rules override model or thinking.
- Reliably re-add reporting block if omitted after payload rules modify system blocks.
- Drop injected thinking.display on Fable models when payload changes thinking type from adaptive to disabled.
- Enhance payload rule path tracking with ancestor target matching in ApplyPayloadConfigWithTrackedPaths.
2026-09-04 15:23:31 +08:00
sususu
d7052c96af feat(claude): add 2.1.258 dynamic beta headers, model fallbacks, and paired cache TTL
- Introduce 2.1.258 dynamic betas: thinking-display-updates-2026-08-18, server-side-fallback-2026-06-01, and fallback-credit-2026-03-24.
- Prune effort-2025-11-24 on Haiku models, probes, and when thinking is disabled.
- Prune thinking-display-updates on disabled thinking and probe/helper turns.
- Identify Fable 5.1 / Mythos 5.1 models with boundary checks and inject default fallbacks and adaptive thinking display.
- Strictly pair 1h cache control with extended-cache-ttl-2025-04-11, stripping TTL on probes and subagents.
2026-09-04 15:23:31 +08:00
sususu
086ad91bd9 feat(claude): implement 2.1.258 billing header fingerprint chain and upstream request continuity
- Assemble x-anthropic-billing-header strictly following official 2.1.258 binary sequence: cc_version -> cc_entrypoint -> cch -> cc_workload -> cc_is_subagent -> cc_prev_req -> cc_prompt_id.
- Track upstream request-id in thread-safe bounded session continuity state and inject into subsequent turns as cc_prev_req.
- Generate and enforce RFC 4122 UUIDv4 cc_prompt_id per user prompt turn, preserving it across tool continuations while suppressing it on probes and title helpers.
- Detect subagents via agent headers and session metadata to emit cc_is_subagent=true.
- Harmonize diagnostics and continuity lifecycles to prevent uncommitted or truncated streams from corrupting state.
- Exclude x-anthropic-billing-header system blocks from sensitive-word zero-width space injection.
2026-09-04 15:23:31 +08:00
sususu
1c45093d10 fix(antigravity): tighten replacement offset guard in tool provenance degradation
Enforce strict monotonic offset ordering (replacement.start <= last) when
splicing degraded tool provenance IDs to reject unknown zero offsets and
prevent overwriting the payload prefix.
2026-09-04 09:45:49 +08:00
Luis Pater
4c1bebe837 fix(auth): preserve concurrent modifications during auth refresh and preparation
- Implement three-way merge for refreshed and prepared auth updates against base and current runtime state.
- Retain user modifications to metadata, attributes, proxy URL, and error/cooldown status across background refresh operations.
- Guard against stale registration epochs and enforce per-auth generation ordering during persistence.

Closes: #5465
2026-09-04 07:03:40 +08:00
Luis Pater
aa36527752 fix(translator/claude): downgrade strict mode when schema misses required properties
- Recursively inspect JSON schema properties to detect optional fields not listed in the `required` array.
- Downgrade `strict` to false when schemas contain optional properties to prevent backend HTTP 400 rejections.

Closes: #5463
2026-09-04 02:02:19 +08:00
Luis Pater
6a26e92a8c fix(translator/interactions): avoid tool name collisions with Antigravity intrinsic tools
- Prefix colliding tool names (`read_file`, `write_file`, `execute_code`) with `external_` when sending requests upstream to Antigravity models.
- Strip the `external_` prefix from Antigravity responses so clients receive the original tool names.
- Apply the name mapping across tool definitions, tool calls, tool results, and tool choice in both Chat Completions and Responses translators.

Closes: #5462
2026-09-04 01:55:33 +08:00
Luis Pater
9ec2bc21c1 Merge pull request #5435 from huangruiteng/codex/openai-compat-bounded-rate-limit-waits
fix(openai-compat): honor bounded rate-limit waits
2026-09-04 01:41:53 +08:00
Luis Pater
b9110ec988 Merge pull request #5452 from deathemperor/docs/add-infinitus
docs: add Infinitus to "Who is with us?"
2026-09-04 01:34:45 +08:00
Luis Pater
649a8bdb6f feat(plugin): omit stream chunk history on payload chunks for schema v5
- Bump plugin schema version to 5 and introduce `SchemaVersionStreamChunkOmitHistory`.
- Omit `HistoryChunks` on payload stream chunks for schema version 5+ to avoid per-chunk cloning and serialization overhead.
- Conditionally accumulate and clone history chunks only when legacy plugins with schema version < 5 are active.

Closes: #5451
2026-09-04 01:19:50 +08:00
Luis Pater
ba2cdea3b9 fix(translator/claude): handle incomplete status and terminal state on max_tokens
- Map Claude `max_tokens` stop reason to `response.incomplete` with `max_output_tokens` incomplete details.
- Propagate `incomplete` status to trailing output items across streaming and non-streaming responses.
- Defer and track output item finalization to ensure correct status and arguments when turns are truncated.

Closes: #5439
2026-09-04 00:39:18 +08:00
rome-xi
e44432ab85 perf(antigravity): batch replay degradation rewrites (#5461) 2026-09-03 23:51:04 +08:00
Luis Pater
f804fb5f30 fix(translator/claude): defer message_delta and cache streaming usage
- Cache token usage metrics from streaming chunks instead of prematurely finalizing content blocks.
- Defer `message_delta` and `message_stop` emissions until encountering a finish reason, a trailing usage chunk, or stream completion.

Closes: #5419
2026-09-03 22:14:30 +08:00
Luis Pater
728ea8b855 fix(translator/gemini): nest image parts inside functionResponse
- Embed image parts under `functionResponse.parts` as `inlineData` instead of appending them as sibling parts to the function response.

Closes: #5415
2026-09-03 21:53:49 +08:00
Luis Pater
2a6b87aca0 feat(openai): send periodic ping control frames during responses websocket streaming
- Add `writePing` to responses websocket writer to emit Ping control frames.
- Send periodic keep-alive Ping frames based on streaming configuration during response forwarding.
- Reset keep-alive interval upon receiving data chunks and abort session if ping write fails.

Closes: #5413
v7.2.149
2026-09-03 21:27:23 +08:00
Luis Pater
291cfb87ef feat(codex): support orphan delegation compatibility via orphan-delegation-compatibility
- Add `codex.orphan-delegation-compatibility` configuration option and mirror it to SDK configuration.
- Convert orphan Codex delegation outputs into standard user messages for requests with `X-Openai-Subagent: collab_spawn`.
- Integrate orphan delegation rewriting into OpenAI responses request handling pipeline.

Closes: #5401
2026-09-03 20:21:24 +08:00
Supra4E8C
93f5266b7b feat: add Swiftproxy Sponser 2026-09-03 20:11:55 +08:00
Supra4E8C
699b06594b feat: 添加 AxisNow 赞助信息及相关图像到 README 文件 2026-09-03 19:29:15 +08:00
Supra4E8C
ebbce50e08 chore: remove sponsorship images for Claude API and Code0 from README files 2026-09-03 19:21:48 +08:00
sususu98
e899f0e539 feat(session): derive distinct branch session ID, parent lineage on Merkle LCP forks, and enhance Codex fork/subagent affinity (#5418) (#5454) 2026-09-03 17:52:40 +08:00
Luis Pater
09471dd9da fix(auth): prevent individual model quota cooldowns from blocking credential
- Ignore aggregated single-model quota cooldowns during credential-level availability checks.
- Keep credentials eligible unless marked completely unavailable or subject to a credential-wide quota.

Closes: #5371
2026-09-03 17:49:57 +08:00
deathemperor
7899e3bcaa docs: add Infinitus to the projects based on CLIProxyAPI
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-03 16:11:01 +07:00
Luis Pater
d577e630b1 feat(routing): make subagent session affinity configurable via session-affinity-subagents
- Add routing.session-affinity-subagents (defaulting to true) to RoutingConfig.
- Unify subagent parent credential inheritance across all providers by removing hardcoded provider/model blacklists.
- When session-affinity-subagents is false, isolate subagents and distribute them via the fallback selector.
- Ensure changing session-affinity-subagents is a no-op when session-affinity is false.
- Preserve alias isolation and failure isolation invariants.

Closes: #5417
v7.2.148
2026-09-03 17:05:35 +08:00
Luis Pater
63fdd77f80 Merge pull request #5436 from router-for-me/models
fix(models): apply Home-provided model capabilities during execution
2026-09-03 16:32:54 +08:00
hkfires
cdda333cd2 fix(codex): clear unsupported reasoning levels 2026-09-03 13:25:56 +08:00
hkfires
c6dd82144b refactor(kimi): use request thinking helper 2026-09-03 13:10:30 +08:00
hkfires
6ff680e90a feat(auth): use home model capabilities for thinking 2026-09-03 13:10:30 +08:00
hkfires
1ecf0cb602 fix(models): preserve home model capability metadata 2026-09-03 13:10:29 +08:00
huangruiteng
6f16121554 fix(openai-compat): honor bounded rate-limit waits 2026-09-03 11:12:09 +08:00
sususu
df7e04ea28 fix(claude): upgrade default Claude Code baseline and fingerprint to 2.1.258
- Bump default Claude Code version baseline from 2.1.220 to 2.1.258 to resolve upstream 400 version gate error
- Update Stainless SDK package version to 0.112.1 and runtime version to v26.3.0
- Refresh default device profile, billing header build hashes, and cloaking signatures
- Decouple unconfirmed client OS/Arch test assertions from host runner platform
- Update config.example.yaml and test suites across executor and helps packages
2026-09-03 10:21:13 +08:00
Luis Pater
18e01a76ac fix(auth): enforce minimum cooldown floor and track attempted credentials on 429
- Enforce a 10-second minimum cooldown floor for quota errors to prevent retry storms from sub-second `Retry-After` values.
- Track attempted authentication credentials per round across execution flows.
- Ensure credentials attempted during a failed 429 round respect the cooldown floor instead of triggering zero-wait retries.

Closes: #5265
2026-09-03 10:02:51 +08:00
Luis Pater
f416175fcd fix(home): map user_credits_insufficient to 402 and user_period_limit_exceeded to 429
- Map `user_credits_insufficient` to `402 Payment Required` in `decodeHomeDispatchError`.
- Map `user_period_limit_exceeded` to `429 Too Many Requests` in `decodeHomeDispatchError`.
- Add unit test coverage for billing and period limit error mappings.

Closes: #5170
2026-09-03 02:59:34 +08:00
Luis Pater
9812b1e768 fix(auth): validate access token expiration and retain valid credentials on refresh failure
- Parse and prioritize JWT `exp` claims when determining access token expiration.
- Retain active credentials and schedule backoff retries on refresh failures if the access token remains unexpired.
- Demote and block auth credentials with expired access tokens during model scheduling and candidate selection.
- Reduce Codex token refresh lead duration to 24 hours.

Closes: #5095
2026-09-03 01:33:11 +08:00
Luis Pater
bdcccfb8e0 chore(registry): remove "minimal" level from dynamic_allowed definitions in models
- Cleaned up unused "minimal" level from dynamic levels across multiple model definitions.
2026-09-02 23:33:22 +08:00
Luis Pater
dacae58228 feat(registry): add claude fable 5.1 and gemini 3.8 flash models
- Add `claude-fable-5-1` model definition with thinking configuration and multimodal capabilities.
- Add `gemini-3.8-flash` and `gemini-3.8-flash-high` model definitions across Google and Antigravity registries.
2026-09-02 23:27:56 +08:00
Luis Pater
272c1cff4e fix(antigravity): bypass quota cooldowns and credit hints when cooling is disabled
- Bypass short cooldown checks and recording in execution flows when cooling is disabled globally or per auth.
- Skip marking credits permanently disabled and refreshing credit hints when cooling is disabled.
- Export quota cooldown status helper functions for auth and configuration evaluations.

Closes: #4793
2026-09-02 22:01:55 +08:00
Luis Pater
d0fb44ca95 fix(antigravity): strip tool config, labels, and session id in token counting
- Strip `request.toolConfig`, `request.labels`, and `request.sessionId` from the payload before dispatching count tokens requests.

Closes: #4749
2026-09-02 21:08:21 +08:00
Luis Pater
02c02cda50 fix: harden concurrent session handling, listener lifecycle, and token accounting
- Use `context.AfterFunc` and buffered delivery in websocket relay sessions to avoid per-request goroutine leaks.
- Synchronize in-flight puts and drain queued connections upon mux listener close.
- Ensure home streaming log writer goroutines terminate cleanly when the log client is unhealthy.
- Prevent integer arithmetic overflow in token breakdown validations and calculations.
- Clone request headers in logging middleware to prevent concurrent mutation issues.
- Implement standard `io.WriterTo` return signature for file body sources.

Closes: #4709
2026-09-02 20:02:42 +08:00
Luis Pater
8deeb4ac31 fix(antigravity): preserve unsigned gemini thinking blocks with trailing carriers
- Precompute carrier context in signature validation to preserve unsigned Gemini thinking blocks followed by valid trailing carriers.
- Avoid dropping unsigned thinking blocks during request translation for Gemini models.
- Validate carrier directions and placement against adjacent semantic content blocks.

Closes: #4628
2026-09-01 21:56:18 +08:00
Luis Pater
c2834b68e6 fix(antigravity): retry model fetching per endpoint and prioritize daily base url
- Retry model fetch requests up to twice per endpoint before falling back to subsequent base URLs.
- Prioritize the daily base URL ahead of production in the default endpoint list.
- Allow injecting custom base URLs and HTTP clients to support testing and configurable fetch execution.

Closes: #4495
2026-09-01 20:46:41 +08:00