Skip to content

Commit 16a6bd2

Browse files
committed
Enforce exhaustive provider handling in runtime spec
1 parent ed31e65 commit 16a6bd2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/ai/src/runtime-spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ export function resolveCuaRuntimeSpec(input: CuaRuntimeSpecInput): CuaRuntimeSpe
6767
onPayload: yutori.yutoriBuiltinToolsOnPayload,
6868
};
6969
case "openai":
70-
default:
7170
return {
7271
model,
7372
provider,
@@ -76,4 +75,7 @@ export function resolveCuaRuntimeSpec(input: CuaRuntimeSpecInput): CuaRuntimeSpe
7675
onPayload: openai.openaiResponsesStoreOnPayload,
7776
};
7877
}
78+
79+
const exhaustiveProvider: never = provider;
80+
throw new Error(`Unsupported CUA provider: ${exhaustiveProvider}`);
7981
}

0 commit comments

Comments
 (0)