mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-14 08:18:34 +00:00
refactor(test): dedupe agent and discord test fixtures
This commit is contained in:
@@ -25,6 +25,28 @@ export const OPENAI_CODEX_TEMPLATE_MODEL = {
|
||||
maxTokens: 128000,
|
||||
};
|
||||
|
||||
export function mockOpenAICodexTemplateModel(): void {
|
||||
mockDiscoveredModel({
|
||||
provider: "openai-codex",
|
||||
modelId: "gpt-5.2-codex",
|
||||
templateModel: OPENAI_CODEX_TEMPLATE_MODEL,
|
||||
});
|
||||
}
|
||||
|
||||
export function buildOpenAICodexForwardCompatExpectation(
|
||||
id: string = "gpt-5.3-codex",
|
||||
): Partial<typeof OPENAI_CODEX_TEMPLATE_MODEL> & { provider: string; id: string } {
|
||||
return {
|
||||
provider: "openai-codex",
|
||||
id,
|
||||
api: "openai-codex-responses",
|
||||
baseUrl: "https://chatgpt.com/backend-api",
|
||||
reasoning: true,
|
||||
contextWindow: 272000,
|
||||
maxTokens: 128000,
|
||||
};
|
||||
}
|
||||
|
||||
export function resetMockDiscoverModels(): void {
|
||||
vi.mocked(discoverModels).mockReturnValue({
|
||||
find: vi.fn(() => null),
|
||||
|
||||
Reference in New Issue
Block a user