fix: use zod instead of zod/v4 for tool type compatibility #211
pr-validation.yaml
on: pull_request
validate
/
validate
1m 54s
Annotations
2 errors
|
validate / validate
Process completed with exit code 1.
|
|
tests/e2e/call-model.test.ts > callModel E2E Tests > Chat-style messages support > should work with chat-style messages and chat-style tools together:
src/models/errors/badrequestresponseerror.ts#L66
BadRequestResponseError: anthropic/claude-haiku:beta is not a valid model ID
❯ Object.transform src/models/errors/badrequestresponseerror.ts:66:12
❯ Object.inst._zod.parse node_modules/.pnpm/[email protected]/node_modules/zod/v4/classic/schemas.js:788:28
❯ handlePipeResult node_modules/.pnpm/[email protected]/node_modules/zod/v4/core/schemas.js:1695:22
❯ Object.inst._zod.parse node_modules/.pnpm/[email protected]/node_modules/zod/v4/core/schemas.js:1686:16
❯ Module.<anonymous> node_modules/.pnpm/[email protected]/node_modules/zod/v4/core/parse.js:6:32
❯ _.inst.parse node_modules/.pnpm/[email protected]/node_modules/zod/v4/classic/schemas.js:27:42
❯ safeParseResponse.request.request src/lib/matchers.ts:301:40
❯ safeParseResponse src/lib/matchers.ts:342:15
❯ matchFunc src/lib/matchers.ts:299:22
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { statusCode: 400, body: '{"error":{"message":"anthropic/claude-haiku:beta is not a valid model ID","code":400},"user_id":"org_2uMVNwONqhSdZXQy1QtyWuCjTxZ"}', headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' }, contentType: 'application/json', rawResponse: { constructor: 'Function<Response>', type: 'basic', url: 'https://openrouter.ai/api/v1/responses', redirected: false, status: 400, ok: false, statusText: 'Bad Request', headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' }, body: { constructor: 'Function<ReadableStream>', locked: true, cancel: 'Function<cancel>', getReader: 'Function<getReader>', pipeThrough: 'Function<pipeThrough>', pipeTo: 'Function<pipeTo>', tee: 'Function<tee>', values: 'Function<values>' }, bodyUsed: true, clone: 'Function<clone>', blob: 'Function<blob>', arrayBuffer: 'Function<arrayBuffer>', text: 'Function<text>', json: 'Function<json>', formData: 'Function<formData>', bytes: 'Function<bytes>' }, 'data$': { error: { code: 400, message: 'anthropic/claude-haiku:beta is not a valid model ID' }, userId: 'org_2uMVNwONqhSdZXQy1QtyWuCjTxZ', 'request$': { constructor: 'Function<Request>', method: 'POST', url: 'https://openrouter.ai/api/v1/responses', headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' }, destination: '', referrer: 'about:client', referrerPolicy: '', mode: 'cors', credentials: 'same-origin', cache: 'default', redirect: 'follow', integrity: '', keepalive: false, isReloadNavigation: false, isHistoryNavigation: false, signal: { constructor: 'Function<AbortSignal>', aborted: false, reason: undefined, throwIfAborted: 'Function<throwIfAborted>', onabort: null, addEventListener: 'Function<addEventListener>', removeEventListener: 'Function<removeEventListener>', dispatchEvent: 'Function<dispatchEvent>' }, body: { constructor: 'Function<ReadableStream>', locked: false, cancel: 'Function<cancel>', getReader: 'Function<getReader>', pipeThrough: 'Function<pipeThrough>', pipeTo: 'Function<pipeTo>', tee: 'Function<tee>', values: 'Function<values>' }, bodyUsed: false, duplex: 'half', clone: 'Function<clone>', blob: 'Function<blob>', arrayBuffer: 'Function<arrayBuffer>', text: 'Function<text>', json: 'Function<json>', formData: 'Function<formData>', bytes: 'Function<bytes>', attribute: undefined }, 'response$': { constructor: 'Function<Response>', type: 'basic', url: 'https://openrouter.ai/api/v1/responses', redirected: false, st
|