Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion open-sse/services/accountFallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
looksLikeQuotaExhausted,
type FailureKind,
} from "../../src/shared/utils/classify429";
import { resolveProviderId } from "../../src/shared/constants/providers";
import { getProviderById, resolveProviderId } from "../../src/shared/constants/providers";
import { resolveUseUpstream429BreakerHints } from "../../src/shared/utils/providerHints";
import { getCodexModelScope } from "../config/codexQuotaScopes.ts";
import { getQuotaScopedModelForProvider } from "./antigravityQuotaFamily.ts";
Expand Down Expand Up @@ -711,6 +711,8 @@ export function hasPerModelQuota(
if (getCanonicalLockProvider(provider) === "codex") return true;
if (provider === "gemini" || provider === "github") return true;
if (getPassthroughProviders().has(provider)) return true;
const sharedProvider = getProviderById(resolveProviderId(provider));
if (sharedProvider?.passthroughModels === true) return true;
if (isCompatibleProvider(provider)) return true;
return false;
}
Expand Down
7 changes: 7 additions & 0 deletions tests/unit/account-fallback-service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,13 @@ test("hasPerModelQuota returns true for GitHub Copilot provider (#1624)", () =>
assert.equal(hasPerModelQuota("github", "gpt-5-mini"), true);
});

test("hasPerModelQuota honors shared passthrough provider metadata (#11071)", () => {
assert.equal(hasPerModelQuota("ollama-local"), true);
assert.equal(hasPerModelQuota("lm-studio"), true);
assert.equal(hasPerModelQuota("vllm"), true);
assert.equal(hasPerModelQuota("mlx-gemma"), false);
});

test("Codex Spark 429s are scoped away from normal Codex models", () => {
const connectionId = `codex-${Date.now()}`;
clearModelLock("codex", connectionId, "gpt-5.3-codex-spark");
Expand Down