Repository navigation
Expose proxy controls for no-auth providers - #7419
diegosouzapw merged 14 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces provider-level proxy configuration controls to the provider detail page, updating components like NoAuthProviderControls, NoAuthAccountCard, and NoAuthProviderCard to support rendering and configuring the proxy. The review feedback advises adding unit tests to cover these new controls in compliance with the repository style guide, and suggests extracting the proxy host to a local constant with text truncation to prevent layout breakage from long hostnames.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52828a76e3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec318b1a0e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb2556aa9e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c6a78027c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Nice fix — the provider disambiguation bug in resolveNoAuthSharedProviderProxy (always resolving the first no-auth provider in iteration order, not the one actually in use) and the #6246 dead-proxy leak-guard gap for the synthetic noauth connectionId are both real, and the new tests (proxy-assigned-unavailable-6246.test.ts, proxy-noauth-provider-6272.test.ts) pin them down well. The NOAUTH_PROVIDER_PROXY_SUPPORTED allowlist (opencode + [provider removed at its operator's request] only) also checks out against the actual executor code — mimocode/chipotle/auggie use their own dispatcher/WebSocket paths that wouldn't honor the provider-level proxy control, so hiding it there is correct. i18n looks complete across all locales. Two things worth a look before/after merge:
Also the PR body's "No automated tests were added or updated" looks stale — looks like the later commits added real coverage in 5 test files, worth updating the description. |
709a726 to
4198a1a
Compare
|
Rebased this PR onto #7380 as a stack so the shared proxy-guard conflict is resolved now. The rebased branch preserves:
Focused verification after the rebase: 18/18 tests passed across the no-auth proxy, dead-assignment, count_tokens, and proxy-context suites. The PR description has also been updated; the stale “No automated tests were added or updated” note is removed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4198a1a5d5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { runWithProxyContext }, | ||
| ] = await Promise.all([import("../../src/lib/db/proxies"), import("../utils/proxyFetch.ts")]); | ||
| deps = { | ||
| resolveProxy: () => resolveProxyForProvider("theoldllm"), |
There was a problem hiding this comment.
Preserve API-key proxy precedence for The Old LLM
When a The Old LLM chat is made with a per-API-key proxy and a provider/global proxy also exists, the outer chat path has already resolved the higher-priority API-key proxy via safeResolveProxy(..., apiKeyInfo.id, provider), but this new resolver fetches the provider/global proxy again and passes it as a non-null argument to runWithProxyContext. Since runWithProxyContext only inherits the current context when its argument is null, the inner provider/global proxy overrides the per-key proxy, breaking per-client egress isolation for this provider; reuse the already-resolved proxy context or only self-resolve when no context is present.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e0a99240ea
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (mitigation === "deny" || mitigation === "challenge") return true; | ||
| return ( | ||
| (response.status === 403 || response.status === 429) && | ||
| /vercel security checkpoint|"message"\s*:\s*"forbidden"/i.test(body) |
There was a problem hiding this comment.
Narrow Vercel denial detection to Vercel signals
When The Old LLM returns a normal app/auth 403 body such as {"error":{"message":"Forbidden"}} without the x-vercel-mitigated header, this broad body match classifies it as Vercel mitigation before isTokenRejected() runs. In that scenario fetchUpstreamWithRetry() skips the fresh-token retry and surfaces a proxy/Vercel error even though the request-token retry path was meant to handle 403s; require the Vercel header or a Vercel-specific body marker here.
Useful? React with 👍 / 👎.
…reducible wiring, campaign 2026-07-18) Three authorized PRs each add irreducible call-site wiring to ProviderDetailPageClient.tsx: cheaper-inference#7360 +5 (ProviderQuotaVisibilityToggle render), cheaper-inference#7419 +4 (NoAuthProviderControls wiring), cheaper-inference#7062 +3 (Dahl provider hook) = 786->798. All three follow the extracted-component pattern; the frozen file only takes the wiring. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Resolves conflict in config/quality/file-size-baseline.json by keeping the consolidated R2/R3 merge-campaign rebaseline entry (786->798) that already accounts for this PR's NoAuthProviderControls wiring (+4), and resolves add/add conflict in src/lib/db/proxies/guards.ts by keeping this PR's hasBlockingProxyAssignment(connectionId, providerId?) signature. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
53a6fea
into
cheaper-inference:release/v3.8.49
|
Merged into |
* fix(theoldllm): honor provider proxy for Vercel blocks * fix(theoldllm): fail closed when assigned proxy is unavailable * refactor(theoldllm): extract proxy guards into dedicated module * fix(ui): expose provider proxy for no-auth providers * fix(proxy): preserve provider-specific no-auth proxy routing * fix(ui): hide unsupported proxy control for VeoAI Free * fix(proxy): handle no-auth provider proxy assignments safely * fix(dns): expose agent-specific host resolution * fix(ui): gate no-auth proxy controls by provider capability * chore(ci): restart GitHub checks * fix(proxy): pass provider to no-auth count tokens resolution * chore(quality): rebaseline ProviderDetailPageClient 786->798 (3-PR irreducible wiring, campaign 2026-07-18) Three authorized PRs each add irreducible call-site wiring to ProviderDetailPageClient.tsx: cheaper-inference#7360 +5 (ProviderQuotaVisibilityToggle render), cheaper-inference#7419 +4 (NoAuthProviderControls wiring), cheaper-inference#7062 +3 (Dahl provider hook) = 786->798. All three follow the extracted-component pattern; the frozen file only takes the wiring. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
* fix(theoldllm): honor provider proxy for Vercel blocks * fix(theoldllm): fail closed when assigned proxy is unavailable * refactor(theoldllm): extract proxy guards into dedicated module * fix(ui): expose provider proxy for no-auth providers * fix(proxy): preserve provider-specific no-auth proxy routing * fix(ui): hide unsupported proxy control for VeoAI Free * fix(proxy): handle no-auth provider proxy assignments safely * fix(dns): expose agent-specific host resolution * fix(ui): gate no-auth proxy controls by provider capability * chore(ci): restart GitHub checks * fix(proxy): pass provider to no-auth count tokens resolution * chore(quality): rebaseline ProviderDetailPageClient 786->798 (3-PR irreducible wiring, campaign 2026-07-18) Three authorized PRs each add irreducible call-site wiring to ProviderDetailPageClient.tsx: cheaper-inference#7360 +5 (ProviderQuotaVisibilityToggle render), cheaper-inference#7419 +4 (NoAuthProviderControls wiring), cheaper-inference#7062 +3 (Dahl provider hook) = 786->798. All three follow the extracted-component pattern; the frozen file only takes the wiring. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Summary
noauthconnection ID.Validation
Tests Added Or Updated
tests/unit/proxy-noauth-provider-6272.test.ts.count_tokensprovider forwarding so the syntheticnoauthconnection resolves the correct provider-level proxy.tests/unit/proxy-assigned-unavailable-6246.test.tsremains part of the change.Coverage Notes
count_tokensregression path is covered together with synthetic no-auth provider disambiguation.Reviewer Notes
count_tokensroute now callssafeResolveProxy(credentials.connectionId, undefined, modelInfo.provider), so the fix(providers): Mimo Code (MiMoCode Free) doesn't use configured proxy #6272 disambiguation and [BUG] Massive issue with proxies since 3.8.44 - IP leak #6246 leak guard also apply there.release/v3.8.49.