Skip to content

chore: merge upstream v0.2.10 preserving downstream contracts - #215

Merged
HTExplicit merged 40 commits into
mainfrom
sync/upstream-0.2.10
Sep 29, 2026
Merged

HTExplicit merged 40 commits into
mainfrom
sync/upstream-0.2.10

Conversation

@HTExplicit

Copy link
Copy Markdown
Owner

Integrates upstream v0.2.10 (2f3fed2fd, 34 commits, 118 paths) into the fork. 17 files conflicted textually; all resolved with semantic review. Decision record: .downstream/upstream-review-v0.2.10.md.

Owner decisions (all four = follow official semantics)

Area Upstream Decision
Risk-control user allowlist Wei-Shaw#7679, 26 files, gateway moderation Adopted verbatim (default off, empty list)
Claude Sonnet 5.5 Wei-Shaw#7683, effort catalog + tool rewrite Adopted verbatim, downstream effort accounting kept
Billing / streamed usage Wei-Shaw#7380, Wei-Shaw#7684 Adopted official normalization
Claude Code-only client tabs Wei-Shaw#7678 Adopted; composed with the fork's OpenCode tab

Downstream deviations deliberately kept

  • Capacity stays manifest-derived. Upstream re-added a hard-coded limit: {context: 1000000, output: 128000} for Claude Opus/Sonnet 5.5. The fork removed those constants in 862e84bbb (v0.2.9) so OpenCode limits come only from resolver-tagged manifest rows. The constants are not restored and the upstream spec assertions were rewritten to the fork contract.
  • The OpenCode tab keeps fetching the Codex manifest for OpenAI groups. fix: 移除 OpenAI 分组 Codex 配置中的模型目录依赖 Wei-Shaw/sub2api#7680 dropped the catalog there, but the fork derives OpenCode capacity from it. Scoped to the opencode tab only: the Codex CLI config keeps upstream behavior exactly (no model_catalog_json, no catalog panel), so the upstream spec for OpenAI Codex tabs still passes unmodified.

Conflict highlights

  • openai_gateway_handler.go (10 hunks): kept the fork's scheduler reporting, selective failure reporting and refusal-recovery cyber input; adopted upstream composite route resolution, the log-only cyber gate, the synchronous session-block write and the body-aware blocked-session lookup. wsRouteModel/wsRoutingModel/wsForwardModel coexist.
  • Settings unions across settings_view.go, setting_parse.go, dto/settings.go, domain_constants.go, setting_handler_update.go.
  • wire_gen.go arguments follow the fork's provider signatures plus compositeRouteResolver and claudeResetCreditService.
  • AccountUsageCell.vue: upstream's stable ClaudeResetCreditsCell instance adopted; fork's empty-usage text and Grok quota probe kept.

Verification

  • GOOS=linux go build ./... passes; pnpm run typecheck passes; pnpm run check:i18n passes.
  • 174 focused frontend specs pass (all conflicted frontend files plus upstream's new ClaudeResetCreditsCell spec).
  • Not run: production migration rehearsal, real model calls, deploy, canary.

Release target

v0.2.10-codexrip.1, fixed digest, deploy-preserve, resource profile preserve, only the Sub2API container recreated.

🤖 Generated with Claude Code

wucm667 and others added 30 commits September 21, 2026 12:58
…t button

The Claude reset credit query rendered as a bare "Claude 重置额度" link,
which reads like a redeem action, and dumped raw ISO timestamps and
window keys. Render it like OpenAIQuotaResetCell instead: a read-only
"次数 N" button sharing one row with the local query button via a
#pre-actions slot, plus an expiry chip whose tooltip carries the grant
label, cleared windows and limit requirement.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Show resets held (sum of resets_left) on the count button, matching the
  Codex count; flag "not usable now" when none is redeemable yet, instead
  of showing 0 while a grant exists.
- Pick the redeemable (next) grant for the expiry chip, falling back to
  the earliest expiry, rather than assuming credits[0] is next.
- Render a single ClaudeResetCreditsCell across usage states so a query
  started while usage loads is not lost on remount.
- Drop an unrelated google/subcommands go.sum entry.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Drop selection_token (unsalted hash of a short grant ID, reversible) and
  claudeGrantSelection from the read-only DTO; assert it never serializes.
- query() returns only the projected result; no raw upstream block escapes.
- Clear a cooldown_until that is already past, using the same `now` as the
  redeemable check; the cell also shows the cooldown only when in the future.
- Invalidate in-flight queries when account id, platform or type changes.
- Sort the earliest-expiry fallback by parsed timestamp, invalid/missing last.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rite

fix(anthropic): rewrite tool names in one body pass
…rd-spending-trend

feat(dashboard): toggle recent usage between tokens and spending
…ity-compat-keepalive

fix(antigravity): keep compat streams alive before first content
…ping-conflict

fix(accounts): warn when whitelist model conflicts with mapping
…e-ws-routing

fix(gateway): resolve composite routes for websocket aliases
…stream-usage

fix(gateway): forward received chat stream usage
…eset-credits-ui

feat(claude): 查询 Claude 重置次数(只读),UI 复用 Codex 次数按钮 / Read-only Claude reset credit count, reusing Codex count UI
Wei-Shaw and others added 6 commits September 29, 2026 15:52
fix: 移除 OpenAI 分组 Codex 配置中的模型目录依赖
…list

feat: 新增可信用户风控白名单,保留审计并免除本地自动处罚
…lient-tabs

feat: Claude Code 专用分组仅展示受支持的客户端入口
Adopts upstream v0.2.10 (2f3fed2) into the fork. All four high-impact
decisions were confirmed by the owner as "follow official semantics":
risk-control user allowlist (Wei-Shaw#7679), Claude Sonnet 5.5 support (Wei-Shaw#7683),
billing/streamed-usage normalization (Wei-Shaw#7380/Wei-Shaw#7684), and hiding unsupported
clients for Claude Code-only groups (Wei-Shaw#7678).

Two deliberate downstream deviations kept, both re-confirmed:

- Capacity stays manifest-derived. Upstream re-introduced a hard-coded
  1M context window for Claude Opus/Sonnet 5.5; the fork removed it in
  v0.2.9 (862e84b) so OpenCode limits come only from resolver-tagged
  manifest rows and stay unknown when no evidence exists.
- The OpenCode tab keeps fetching the Codex model manifest for OpenAI
  groups. Upstream Wei-Shaw#7680 dropped the catalog there, but the fork derives
  OpenCode capacity from that manifest, so the catalog panel and fetch stay
  for the opencode tab only; the Codex CLI config keeps upstream behavior
  (no model_catalog_json reference, no panel).

Conflict resolution notes:
- Union of settings keys, handler fields and DTOs (cyber policy allowlist
  plus the fork's refusal/alpha-search keys).
- openai_gateway_handler.go: kept the fork's scheduler reporting and
  selective proxy-failure reporting, adopted upstream composite route
  resolution, the log-only cyber gate and its synchronous session-block write.
- wire_gen.go arguments follow the fork's provider signatures plus the new
  composite route resolver and Claude reset credit service.
- AccountUsageCell.vue: adopted upstream's single stable ClaudeResetCreditsCell
  instance while keeping the fork's empty-usage text and Grok quota probe.
- AccountUsageCell/EditAccountModal/ModelWhitelistSelector/UseKeyModal specs
  updated to the manifest-derived capacity contract.

Verification (minimal, scoped to this diff): GOOS=linux go build ./... passes;
pnpm typecheck passes; i18n completeness passes; 174 focused frontend specs
pass. No production migration, real model call or deploy was performed here.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@HTExplicit HTExplicit added upstream-review-required Manual upstream review is required upstream-reviewed Human upstream overlap review completed labels Sep 29, 2026
Codex and others added 4 commits September 30, 2026 00:56
Upstream v0.2.10 removed the includeUsage parameter from
handleCCStreamingFromAnthropic and handleCCStreamingFromNativeAnthropic and
normalizes streamed usage inside the handlers instead. The fork's own protocol
caller specs still passed the argument, which failed vet, lint and the
Downstream backend job.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The release workflow derives the upstream version from the tag and requires
.downstream/upstream-base to match it, so both move with the v0.2.10 baseline.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ur the cyber allowlist

The v0.2.10 merge left the WebSocket scheduler on the client alias, so composite
aliases to Grok found no account, and kept the fork's asynchronous session-block
write next to upstream's synchronous, log-only-aware one, so allowlisted users
still got transcript blocks. Follow upstream for both, and count rejected-turn
upstream frames with the fork harness's frameCount.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HTExplicit
HTExplicit merged commit 2c01bce into main Sep 29, 2026
21 checks passed
@HTExplicit
HTExplicit deleted the sync/upstream-0.2.10 branch September 29, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream-review-required Manual upstream review is required upstream-reviewed Human upstream overlap review completed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants