ai icon indicating copy to clipboard operation
ai copied to clipboard

Blank system prompt prevents using @cf/meta/llama-4-scout-17b-16e-instruct in workers-ai-provider

Open baptistelaget opened this issue 7 months ago • 1 comments
trafficstars

Problem: In the workers-ai-provider package, the convertToWorkersAIChatMessages function currently pushes an empty string as the system prompt, which causes @cf/meta/llama-4-scout-17b-16e-instruct to error. The model API endpoint works fine without a system prompt but does not accept an empty string.

Reference: convert-to-workersai-chat-messages.ts line 10

Proposal: I can open a PR to fix this in convertToWorkersAIChatMessages. Alternatively, should this be handled at the API level for better resilience? Ideally, passing an empty string as a system prompt would just be ignored.

baptistelaget avatar Apr 09 '25 23:04 baptistelaget