D1 TYPE ERROR: Type 'object' not supported for value '[object Object]'

"tool_calls":[] object."tool_calls":[] goes away and instead some json is output is streamed in the response string."type": "function" and sometimes not.@cf/black-forest-labs/flux-1-schnell via the workers AI binding for text-to-image, which recently stopped working for me, giving me this response:@cf/qwen/qwen2.5-coder-32b-instruct. This really sucks when your paying for tokens, a couple of hundred token for nothing per request can start to add up.


wrangler typesmessages[1].content being an object instead of string. The string format only works for text, however, not image, i.e. {role: 'user', content: dataUri} will not choke but Gemma will completely hallucinate the actual content of the image, while recognizing the same image just fine if uploaded in aistudio.google.com.https://cataas.com/cat);data:image/jpeg;base64,${base64};AI.run error, e);{" or <function (it was I think) it's not a function call, else it is one. In theory @cloudflare/ai-utils can do that, but it calls the model twice (once without streaming and in case it does not call a tool - again with streaming), so I didn't want to use it"tool_calls":[]"tool_calls":[]response"type": "function"@cf/black-forest-labs/flux-1-schnellMonthly usage limit for image reached for your plan. Please upgrade.@cf/qwen/qwen2.5-coder-32b-instruct⎔ Starting local server...
[wrangler:inf] Ready on http://localhost:8788
✘ [ERROR] OAuth error response: 401 invalid_token - Missing or invalid access token
[wrangler:inf] POST /sse 401 Unauthorized (6ms)
[wrangler:inf] GET /.well-known/oauth-authorization-server 200 OK (1ms)
[wrangler:inf] GET /authorize 302 Found (68ms)
[wrangler:inf] GET /callback 302 Found (871ms)
[wrangler:inf] GET /.well-known/oauth-authorization-server 200 OK (2ms)
✘ [ERROR] OAuth error response: 401 invalid_client - Client not found
[wrangler:inf] POST /token 401 Unauthorized (3ms)wrangler typesmessages[1].content{role: 'user', content: dataUri}https://cataas.com/catdata:image/jpeg;base64,${base64}AI.run error{"<function{{{{ ...the expected response... } } ] } } } \n' +
'\n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' \n' +
' ',