new_pull
This commit is contained in:
@@ -12,7 +12,7 @@ import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
import { AuthStorage } from "../src/core/auth-storage.ts";
|
||||
import { createAgentSession } from "../src/core/sdk.ts";
|
||||
import { SessionManager } from "../src/core/session-manager.ts";
|
||||
import { SettingsManager } from "../src/core/settings-manager.ts";
|
||||
import { type Settings, SettingsManager } from "../src/core/settings-manager.ts";
|
||||
|
||||
import { createModelRegistry, getModelRuntime } from "./model-runtime-test-utils.ts";
|
||||
|
||||
@@ -76,7 +76,7 @@ describe("createAgentSession stream options", () => {
|
||||
|
||||
async function captureStreamOptions(
|
||||
api: Api,
|
||||
settings: { httpIdleTimeoutMs?: number; websocketConnectTimeoutMs?: number },
|
||||
settings: Partial<Settings>,
|
||||
requestOptions: SimpleStreamOptions = {},
|
||||
extensionSource?: string,
|
||||
): Promise<SimpleStreamOptions | undefined> {
|
||||
@@ -161,6 +161,15 @@ describe("createAgentSession stream options", () => {
|
||||
expect(options?.websocketConnectTimeoutMs).toBe(0);
|
||||
});
|
||||
|
||||
it("forwards provider retry settings", async () => {
|
||||
const options = await captureStreamOptions("openai-completions", {
|
||||
retry: { provider: { maxRetries: 2, maxRetryDelayMs: 3000 } },
|
||||
});
|
||||
|
||||
expect(options?.maxRetries).toBe(2);
|
||||
expect(options?.maxRetryDelayMs).toBe(3000);
|
||||
});
|
||||
|
||||
it("runs before_provider_headers on assembled headers without forwarding the transform", async () => {
|
||||
const options = await captureStreamOptions(
|
||||
"openai-completions",
|
||||
|
||||
Reference in New Issue
Block a user