Skip to content

Commit a17e66d

Browse files
committed
test(agents): type native prompt observer models
1 parent c715afd commit a17e66d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎packages/ai/src/transports/openai-responses-prompt-observer.test.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { zstdDecompressSync } from "node:zlib";
2-
import type { Context, Model } from "@openclaw/llm-core";
2+
import type { Api, Context, Model } from "@openclaw/llm-core";
33
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
44
import { configureAiTransportHost, getAiTransportHost } from "../host.js";
55
import { responsesPromptObserver, type ResponsesPromptObservation } from "../internal/openai.js";
@@ -45,7 +45,9 @@ import {
4545

4646
const initialHost = getAiTransportHost();
4747

48-
function createModel(overrides: Partial<Model> = {}): Model {
48+
function createModel<TApi extends Api = "openai-responses">(
49+
overrides: Partial<Model<TApi>> = {},
50+
): Model<TApi> {
4951
return {
5052
id: "gpt-5.4",
5153
name: "GPT-5.4",
@@ -58,7 +60,7 @@ function createModel(overrides: Partial<Model> = {}): Model {
5860
contextWindow: 200_000,
5961
maxTokens: 8192,
6062
...overrides,
61-
} as Model;
63+
} as Model<TApi>;
6264
}
6365

6466
function createContext(systemPrompt: string, overrides: Partial<Context> = {}): Context {

0 commit comments

Comments
 (0)