mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 16:34:45 +00:00
test(agents): stabilize embedded runner release checks
This commit is contained in:
@@ -345,8 +345,17 @@ describe("runEmbeddedPiAgent", () => {
|
||||
|
||||
it("resolves explicit OpenAI PI runs through Codex when auth order starts with Codex OAuth", async () => {
|
||||
const sessionFile = nextSessionFile();
|
||||
const baseConfig = createEmbeddedPiRunnerOpenAiConfig(["mock-1"]);
|
||||
const cfg = {
|
||||
...createEmbeddedPiRunnerOpenAiConfig(["mock-1"]),
|
||||
...baseConfig,
|
||||
models: {
|
||||
providers: {
|
||||
openai: {
|
||||
...baseConfig.models?.providers?.openai,
|
||||
baseUrl: "https://api.openai.com/v1",
|
||||
},
|
||||
},
|
||||
},
|
||||
agents: {
|
||||
defaults: {
|
||||
models: {
|
||||
|
||||
@@ -76,6 +76,8 @@ vi.doMock("../../../src/agents/pi-embedded-runner/runs.js", () => ({
|
||||
: undefined,
|
||||
queueEmbeddedPiMessageWithOutcome: (sessionId: string, text: string, options?: unknown) =>
|
||||
piEmbeddedMocks.queueEmbeddedPiMessageWithOutcome(sessionId, text, options),
|
||||
resolveActiveEmbeddedRunSessionId: (...args: unknown[]) =>
|
||||
piEmbeddedMocks.resolveActiveEmbeddedRunSessionId(...args),
|
||||
}));
|
||||
|
||||
const providerUsageMocks = vi.hoisted(() => ({
|
||||
|
||||
Reference in New Issue
Block a user