ai
ai copied to clipboard
Blank system prompt prevents using @cf/meta/llama-4-scout-17b-16e-instruct in workers-ai-provider
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.