Skip to content

fix(bigmodel): restore Responses preset quota visibility - #4210

Closed
Ingwannu wants to merge 1 commit into
devfrom
ingw/fix-bigmodel-responses-quota-4201
Closed

fix(bigmodel): restore Responses preset quota visibility#4210
Ingwannu wants to merge 1 commit into
devfrom
ingw/fix-bigmodel-responses-quota-4201

Conversation

@Ingwannu

@Ingwannu Ingwannu commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Summary

Refs #4201quota-reader omission only; the Flash model-support request remains open.

  • Admit the existing zhipu-bigmodel-responses preset to the existing canonical Z.ai/BigModel quota reader.
  • Preserve domestic monitor selection, raw Authorization, redirect refusal, parsing and inference configuration.
  • Parameterize the existing domestic /api/v1 regression across both Coding Plan preset IDs and their wire adapters; add custom-host and pay-as-you-go no-dispatch controls.
  • Document why quota support is separate from the deliberately static Responses model roster. No provider preset or model metadata is added.

The installed-source report is confirmed in dev at 6d3ad12e3fbfd8423f1515a467db4d3349732886: the URL is already admitted, but the provider-name selector omits this preset. This is independent of #4174's international endpoint fix.

Verification

  • git diff --check: passed.
  • Existing read-only scripts/privacy-scan.ts: passed using fresh HOME, OPENCODEX_HOME, CODEX_HOME and transpiler cache.
  • Protected local runtime file existence/mode/size/SHA-256 unchanged; no process restart or live credential/provider probe.
  • Added mocked regression coverage has not been run locally: product execution remains blocked on reliable filesystem/network isolation in this environment. Typecheck, product tests and documentation build are not claimed green.
  • Exact-head upstream Cross-platform CI 34491624277: successful at b9109a151aef864cdfe4d22bdac6623164a4ca0a. Linux/macOS shards, typecheck/privacy, Docker, keyring and npm-global smoke passed. Full Windows shards and macOS control were skipped, not executed.
  • Verified macOS shard 2 logs include all four BigModel positive/negative regression cases passing.
  • Draft pending documentation build and independent review; local test execution remains unclaimed.

Review must preserve the exact destination guard and domestic authorization format. Do not broaden to custom gateways or infer Flash support from the Chat preset.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Review readiness

  • All CI tests are green on my local testing.
  • I pushed my PR to the latest dev commit.
  • I resolved all correct Codex and CodeRabbit findings.
  • My PR is ready for review.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@Ingwannu

Copy link
Copy Markdown
Owner Author

@lidge-jun Exact-head Cross-platform CI 34491624277 is now successful at b9109a1. I checked the actual macOS shard-2 log: both domestic preset cases and the custom-host/PAYG no-dispatch controls passed. Linux/macOS shards, typecheck/privacy, Docker, keyring and npm-global smoke also passed. Full Windows shards and macOS control were skipped by the workflow, not run.

This is only the confirmed BigModel Responses quota-reader omission from #4201. No model roster, Flash entitlement, endpoint expansion, or live account/config change is included. The PR stays Draft for the remaining docs build and independent review; no merge was performed.

@lidge-jun

Copy link
Copy Markdown
Owner

리뷰 · 우선순위 68 / 80

이 PR은 열려 있는 이슈 #4201의 쿼터 리더 누락만 고칩니다. 지금 dev HEAD(cc871a876, 패키지 2.51.0, #4221 문서 wp3 머지 직후)에서 src/providers/quota.tskeyQuotaReaderForProvider는 이름 목록이 zai / glm / glm-cn / zhipu-bigmodel-coding 일 때만 fetchZaiQuota로 갑니다. 대시보드·문서에 이미 있는 Responses Coding Plan 프리셋 이름 zhipu-bigmodel-responses 는 같은 국내 모니터 URL을 써도 이름 셀렉터에서 빠지기 때문에 쿼터가 비어 보입니다. 프리셋·모델 로스터는 건드리지 않고 이름 한 줄과 회귀 테스트·가이드 문장만 넣는 범위라서, 현재 dev의 BigModel 정적 로스터 정책과도 충돌하지 않습니다.

국제 엔드포인트 쪽 #4174와는 독립입니다. 이 패치는 국내 open.bigmodel.cn 모니터와 raw Authorization·리다이렉트 거부를 그대로 두고, Responses 프리셋만 같은 리더에 넣습니다. Flash/모델 디스커버리는 의도적으로 열지 않았고, 문서에도 그 경계를 적어 두었습니다. 변경량이 작고 검증 축이 명확해서, 드래프트라도 머지 후보 가치가 높습니다.

src/providers/quota.ts 약 2909라인 근처 - 지금 HEAD는 zhipu-bigmodel-responses가 빠져 있어 Responses 프리셋이면 providerApiKeyQuotaMode가 unsupported처럼 보입니다. PR이 이름을 배열에 넣는 방향은 맞습니다.
tests/providers/provider-quota.test.ts - test.each로 coding/responses를 묶고, 비정규 게이트웨이·paas/v4 는 호출 0회를 단언한 점이 좋습니다. 다만 작성자 말대로 로컬에서 이 회귀를 아직 안 돌렸다고 하니, 머지 전에 해당 파일만이라도 한 번 돌려 주세요.
docs-site/.../guides/providers.md - 쿼터와 정적 로스터를 분리해 설명한 문장은 유지해야 합니다. Flash 지원을 이 PR로 암시하면 #4201 나머지와 섞입니다.
경로/심볼 keyQuotaReaderForProvider - 커스텀 baseUrl·리다이렉트 허용으로 넓히면 안 됩니다. 기존 isCanonicalZaiBaseUrl + redirect:error 가드를 그대로 두세요.

메인테이너의 판단이 필요한 지점

  • #4201의 Flash/카탈로그 요청은 이 PR 범위 밖으로 남길지(추천: 남김).
  • 드래프트 체크리스트와 Cross-platform CI 스킵(Windows/macOS control)을 그대로 두고 Linux 샤드 그린만으로 ready를 줄지.
  • fix(zai): recognize coding quota endpoints without crossing regions #4174(국제)와 랜딩 순서를 맞출지, 아니면 이 쿼터 누락만 먼저 독립 머지할지.

너의 추천
범위 유지한 채 zhipu-bigmodel-responses 이름 추가 + 회귀 테스트 그린 확인 후 드래프트 해제하고 #4201에 quota-reader slice landed; Flash remains open 정도로 남기세요. Flash/모델 디스커버리는 별도 PR로 쪼개세요.

이 댓글은 grok-bot이 작성했습니다

@Ingwannu

Copy link
Copy Markdown
Owner Author

Closing this duplicate in favor of #4231, which is already on dev as df65a25. I checked the landed name admission, unchanged canonical destination/redirect guard, and dedicated positive/negative quota tests against this PR's scope. No second quota implementation or rebase is needed.

#4201 remains open for the separate Flash/catalog evidence. The public providers guide still omits the Responses preset from its quota-name list at babb764; #4231's lane notes assign that documentation followup separately, so closing this PR does not claim that prose has already shipped. Thanks for retaining the attribution. No merge or local runtime change was performed by me.

@Ingwannu Ingwannu closed this Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants