Repository navigation
fix(providers): restore specialty validator dispatch for web-cookie providers (+ restore-green for #4440/#4443 baselines) - #4460
Closed
diegosouzapw wants to merge 1 commit into
Conversation
…roviders PR #4023 introduced a generic /models web-cookie probe in validateProviderApiKey that silently took precedence over the per-provider specialty validators (qwen-web, grok-web, chatgpt-web, claude-web, gemini-web, copilot-web, deepseek-web, perplexity-web, blackbox-web, muse-spark-web, t3-web, adapta-web, inner-ai). For qwen-web this regressed the body-check fix from #3958 — the generic probe accepts any 200 as valid, where the specialty validator inspects data.user on /api/v2/user to detect expired sessions that still return 200. Every other specialty web-cookie validator was equally bypassed. The dispatcher now gates the generic probe on a WEB_COOKIE_PROVIDERS_WITH_SPECIALTY_VALIDATOR set so providers with bespoke validators reach them again. A new tests/unit/web-cookie-specialty-dispatch.test.ts enforces the invariant (every override must really be a registered web-cookie provider, and qwen-web's specialty path must hit /api/v2/user, not /models). Also rebaseline (restore-green of release/v3.8.32 fast-gates): - src/lib/providers/validation.ts 4518 -> 4556 (own growth, this fix) - src/shared/constants/pricing.ts 1620 -> 1623 (drift from #4440) - open-sse/executors/base.ts 1399 -> 1407 (drift from #4443)
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
2 tasks done
Owner
Author
|
Fechando como superseded. O conteúdo deste PR aterrissou em release/v3.8.32 dividido em peças estreitas:
Como as duas metades já estão na release (e este branch ficou CONFLICTING contra elas), não há nada a mergear aqui. Reabrível se necessário. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/modelsprobe invalidateProviderApiKeythat silently took precedence over the per-provider specialty validators (13 providers: qwen-web, grok-web, chatgpt-web, claude-web, gemini-web, copilot-web, deepseek-web, perplexity-web, blackbox-web, muse-spark-web, t3-web, adapta-web, inner-ai).data.useron/api/v2/userto detect expired sessions that still return 200 (Qwen's actual behavior). Every other specialty web-cookie validator was equally bypassed.WEB_COOKIE_PROVIDERS_WITH_SPECIALTY_VALIDATORset, so providers with bespoke validators reach them again.--admin(fix(pricing): align Claude Code (cc) model pricing with Anthropic #4440 pricing.ts, fix(executors): granular reasoning_effort handling for Claude models on Copilot #4443 base.ts) into this PR so the fast-gates job goes back to green in one shot.Test plan
tests/unit/qwen-web-cookie-validation-3958.test.ts(was failing on the tip ofrelease/v3.8.32; passes after the fix).tests/unit/web-cookie-specialty-dispatch.test.tsenforces (a) every entry in the override set is a real web-cookie provider, and (b) qwen-web's dispatch hits/api/v2/user, never/models.provider-validation-specialty,provider-validation-hardening,provider-validation-azure-vertex, the existing qwen-web test, the new invariant test): 131/131 passing locally.npm run check:file-size,npm run typecheck:core,npm run lint— all clean.File-size rebaselines (documented in
config/quality/file-size-baseline.json)src/lib/providers/validation.tssrc/shared/constants/pricing.ts--adminopen-sse/executors/base.ts--admin