@@ -934,6 +934,19 @@ describe("resolveGatewayLiveModelThinkingLevel", () => {
|
934 | 934 | }); |
935 | 935 | }); |
936 | 936 | |
| 937 | +describe("buildLiveGatewayConfig", () => { |
| 938 | +it("pins selected live gateway models to the Pi runtime", () => { |
| 939 | +const cfg = buildLiveGatewayConfig({ |
| 940 | +cfg: {}, |
| 941 | +candidates: [createGatewayLiveTestModel("openai", "gpt-5.5")], |
| 942 | +}); |
| 943 | + |
| 944 | +expect(cfg.agents?.defaults?.models?.["openai/gpt-5.5"]).toEqual({ |
| 945 | +agentRuntime: { id: "pi" }, |
| 946 | +}); |
| 947 | +}); |
| 948 | +}); |
| 949 | + |
937 | 950 | function isGoogleModelNotFoundText(text: string): boolean { |
938 | 951 | const trimmed = text.trim(); |
939 | 952 | if (!trimmed) { |
@@ -1888,7 +1901,15 @@ function buildLiveGatewayConfig(params: {
|
1888 | 1901 | // Live tests should avoid Docker sandboxing so tool probes can |
1889 | 1902 | // operate on the temporary probe files we create in the host workspace. |
1890 | 1903 | sandbox: { mode: "off" }, |
1891 | | -models: Object.fromEntries(params.candidates.map((m) => [`${m.provider}/${m.id}`, {}])), |
| 1904 | +// This suite validates direct provider/API-key gateway behavior. OpenAI |
| 1905 | +// agent models otherwise use the implicit Codex runtime, which tests a |
| 1906 | +// different auth/runtime path and can hang until the model timeout. |
| 1907 | +models: Object.fromEntries( |
| 1908 | +params.candidates.map((m) => [ |
| 1909 | +`${m.provider}/${m.id}`, |
| 1910 | +{ agentRuntime: { id: "pi" as const } }, |
| 1911 | +]), |
| 1912 | +), |
1892 | 1913 | }, |
1893 | 1914 | }, |
1894 | 1915 | models: |
|