Repository navigation
Conversation
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. This PR stays in draft until every box above is ticked. |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Ingwannu
left a comment
There was a problem hiding this comment.
Please do not merge hardcoded substring caps in this form. The values are not derived from provider/model metadata, several aliases can match the wrong branch, and every unknown Google-routed model is silently clamped to 16,384 tokens. That can truncate models which support more output and makes future model additions depend on editing this adapter table. The cap needs an authoritative per-model source (live metadata or the existing catalog/config capability path), a conservative no-cap behavior when unknown, and regressions for aliases plus unknown/custom models. Keep this draft while the contract is redesigned.
리뷰 · 우선순위 52 / 80설명: 이 풀은 구글 어댑터가 내보내는 maxOutputTokens 를 모델마다 아래로만 자르려는 드래프트다. 2470 에서 잘랐다. 범위는 클램프만이다. thinkingBudget 과 묶지 않는다. 지금 CURRENT dev HEAD 는 bb89eaf 이다. origin/dev 는 이번 시간에 안 움직였다. 베이스는 dev 이고 MERGEABLE 이다. 머지 상태는 BLOCKED 다. 드래프트다. 점검이 비어 있다. 지금 HEAD 의 src/adapters/google.ts 653줄은 요청값이 있으면 그대로 generationConfig.maxOutputTokens 에 넣는다. 이 파일이 그 값을 쓰는 곳은 그 한 줄뿐이다. createGoogleAdapter 한 길이라서 다이렉트와 버텍스와 클라우드 코드 어시스트가 같이 잘린다. 이 풀은 maxOutputTokensForGoogleModel 과 clampGoogleMaxOutputTokens 를 같은 파일 위에 넣는다. flash 는 65536, pro 는 65535, claude 는 64000, gpt-oss 또는 oss 는 32768, gemini 로 시작하면 65536, 나머지는 16384 다. 요청이 없거나 0 이하면 칸 자체를 안 넣는다. 부분 문자열 매칭이 너무 넓다. includes("oss") 는 gpt-oss 만이 아니다. 아이디 어디에 oss 세 글자가 있으면 32768 로 떨어진다. includes("pro") 는 flash 다음이라 gemini-3.7-flash 는 산다. 그러나 이름에 pro 가 들어간 다른 아이디도 65535 가 된다. includes("claude") 는 안티그래비티 클로드 경로를 노린 것이다. 기본 16384 는 모르는 아이디를 너무 낮게 자를 수 있다. 시험 tests/google-output-clamp.test.ts 는 헬퍼만 잠근다. 어댑터가 실제로 generationConfig 에 넣는지는 잠그지 않는다. 라이브 한도 측정도 본문에 없다. 2470 은 이미 닫혔다. 이 풀로 다시 열거나 다른 구글 구멍을 닫지 말 것. 2510 의 429 분류, 2513 의 생각 서명 재생과 겹치지 않는다. 한 줄로 묶지 말 것. types.ts/config.ts 가르기를 건드리지 않는다. 닫고 다시 짜라고 하지 않는다. 다만 드래프트이고 점검이 비어 있으니 지금 합치지 않는다. src/adapters/google.ts 653 - HEAD 는 요청값을 그대로 넣는다. 이 풀의 유일한 클램프 자리다 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
…eiling for unknown ids (rebase of #2512) (#2576) * fix(google): clamp max output tokens per model * fix(google): clamp max output tokens per model * fix(google): do not invent an output ceiling for unrecognized models The clamp matched by substring and fell back to 16,384 for anything unmatched, so an alias, a gateway id, or any model newer than the table was silently truncated to 16,384 regardless of what the operator asked for. structure/02_config-and-codex-home.md is explicit that an explicit request value wins. Unknown ids now return undefined and pass the request through untouched; the upstream stays the authority on its own limit. Matching is also prefix/family based, because includes(pro) matched my-prototype-model and includes(oss) matched crossover-v2. --------- Co-authored-by: Hsia97 <xjxj1997@163.com>
|
Landed on I folded in the review findings rather than sending them back. Two things: the unmatched fallback to 16,384 silently truncated aliases, gateway-prefixed ids, and any model newer than the table regardless of what the operator requested — The original test asserted the 16,384 fallback, which locked the defect in; it now pins the passthrough contract and the substring cases instead. 16 pass across the two Google suites, typecheck clean. Thanks for the fix. |
…eiling for unknown ids (rebase of lidge-jun#2512) (lidge-jun#2576) * fix(google): clamp max output tokens per model * fix(google): clamp max output tokens per model * fix(google): do not invent an output ceiling for unrecognized models The clamp matched by substring and fell back to 16,384 for anything unmatched, so an alias, a gateway id, or any model newer than the table was silently truncated to 16,384 regardless of what the operator asked for. structure/02_config-and-codex-home.md is explicit that an explicit request value wins. Unknown ids now return undefined and pass the request through untouched; the upstream stays the authority on its own limit. Matching is also prefix/family based, because includes(pro) matched my-prototype-model and includes(oss) matched crossover-v2. --------- Co-authored-by: Hsia97 <xjxj1997@163.com>
…eiling for unknown ids (rebase of lidge-jun#2512) (lidge-jun#2576) * fix(google): clamp max output tokens per model * fix(google): clamp max output tokens per model * fix(google): do not invent an output ceiling for unrecognized models The clamp matched by substring and fell back to 16,384 for anything unmatched, so an alias, a gateway id, or any model newer than the table was silently truncated to 16,384 regardless of what the operator asked for. structure/02_config-and-codex-home.md is explicit that an explicit request value wins. Unknown ids now return undefined and pass the request through untouched; the upstream stays the authority on its own limit. Matching is also prefix/family based, because includes(pro) matched my-prototype-model and includes(oss) matched crossover-v2. --------- Co-authored-by: Hsia97 <xjxj1997@163.com>
Split from #2470 (closed). Scope: maxOutputTokens clamping only.
Changes:
Verification:
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
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.