Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): delegated tasks use the fallback model when the inherited provider is out of usage #28234

Closedjuliusmarmingewants to merge 5 commits intomain fromfix/issue-28203opened View on GitHub

Showing 2 changed files with 182 additions and 0 deletions (loading 1).

x
0 of 2 viewed, 2 left
182 additions and 0 deletionsapps/server/src/mcp/OrchestratorMcpService.test.tsModified
View file
@@ -1642,6 +1642,188 @@
+ it.effect(
+ "implicit delegation uses the fallback model when the parent's provider is out of usage",
+ () =>
+ Effect.gen(function* () {
+ const fallbackInstanceId = ProviderInstanceId.make("claudeAgent");
+ const fallbackModelSelection = {
+ instanceId: fallbackInstanceId,
+ model: "claude-sonnet-4-6",
+ };
+ const effortHigh = { id: "effort", value: "high" };
+ const exhaustedCodex: ServerProvider = {
+ ...providerSnapshot({
+ instanceId: codexInstanceId,
+ driver: ProviderDriverKind.make("codex"),
+ model: "gpt-5.4",
+ }),
+ usageLimits: {
+ checkedAt: "2026-09-13T00:00:00.000Z",
+ windows: [
+ {
+ id: "weekly",
+ kind: "weekly",
+ label: "Weekly",
+ usedPercent: 100,
+ resetsAt: "2999-01-01T00:00:00.000Z",
+ },