| 36 | } |
| 37 | |
| 38 | export function verifierConfig(llmUrl: string, skills?: string) { |
| 39 | const config = testProviderConfig(llmUrl) |
| 40 | return { |
| 41 | ...config, |
| 42 | model: "test/test-model", |
| 43 | ...(skills ? { skills: { paths: [skills] } } : {}), |
| 44 | provider: { |
| 45 | test: { |
| 46 | ...config.provider.test, |
| 47 | models: { |
| 48 | "test-model": { |
| 49 | ...config.provider.test.models["test-model"], |
| 50 | variants: { |
| 51 | low: {}, |
| 52 | high: {}, |
| 53 | }, |
| 54 | }, |
| 55 | "second-model": { |
| 56 | ...config.provider.test.models["test-model"], |
| 57 | id: "second-model", |
| 58 | name: "Second Test Model", |
| 59 | variants: { |
| 60 | medium: {}, |
| 61 | max: {}, |
| 62 | }, |
| 63 | }, |
| 64 | }, |
| 65 | }, |
| 66 | }, |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | export function expectErrorCode(error: unknown, code: number) { |
| 71 | if (!error || typeof error !== "object" || !("code" in error)) { |