You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
createAI (pi-ai): Anthropic catalog models may fail on /run when system is an array #2631
cloudflare/ai#672 reports that AI Gateway's /run rejects an Anthropic Messages body whose system is an array of text blocks: 7003: Model execution failed (User Input Error): Invalid value at system: Invalid input: expected string, received array. createAI's pi-ai provider sends exactly that body for an Anthropic catalog id, so every request with a system prompt may fail.
The body is pi-ai's own, passed through by packages/agents/src/models/pi-ai/wires/anthropic.ts. Not checked live: the old package didn't send openaiEndpoint, and createAI does, so /run may validate it differently. If it does fail, either /run should accept the array (it's valid Anthropic) or the wire should join text-only blocks into a string on /run only. The AI SDK provider isn't affected: string ids go over chat completions.
Activity