Bug
Requests that include images in the message payload are silently accepted by Cerebras and Groq, but the images are never forwarded to the provider API. The response is generated from text only, with no indication that the images were ignored.
Locations:
src/providers/cerebras.ts — no supportsVision property on the class (should be supportsVision = false)
src/providers/groq.ts — same
Neither provider implements image formatting in formatRequest / formatMessageContent. Because supportsVision is absent (evaluates falsy), the factory does not exclude these providers from the fallback chain when a vision request arrives.
Contrast with Cloudflare
src/providers/cloudflare.ts:469–473 correctly throws a ConfigurationError when a model without supportsVision capability receives image inputs. Cerebras and Groq need equivalent protection.
Impact
A caller that sends a vision request and happens to be routed to Cerebras or Groq receives a degraded, text-only response with no error. The call succeeds (HTTP 200), masking the data loss entirely.
Fix
- Add
supportsVision = false to both CerebrasProvider and GroqProvider
- In
LLMProviderFactory.buildProviderPlan(), filter providers by supportsVision when request.images?.length > 0, or throw ConfigurationError before the request is dispatched — matching the Cloudflare pattern
Acceptance criteria
Found by
Codebase audit (automated) — independently flagged by provider-parity and vision-handling audit slices
Bug
Requests that include
imagesin the message payload are silently accepted by Cerebras and Groq, but the images are never forwarded to the provider API. The response is generated from text only, with no indication that the images were ignored.Locations:
src/providers/cerebras.ts— nosupportsVisionproperty on the class (should besupportsVision = false)src/providers/groq.ts— sameNeither provider implements image formatting in
formatRequest/formatMessageContent. BecausesupportsVisionis absent (evaluates falsy), the factory does not exclude these providers from the fallback chain when a vision request arrives.Contrast with Cloudflare
src/providers/cloudflare.ts:469–473correctly throws aConfigurationErrorwhen a model withoutsupportsVisioncapability receives image inputs. Cerebras and Groq need equivalent protection.Impact
A caller that sends a vision request and happens to be routed to Cerebras or Groq receives a degraded, text-only response with no error. The call succeeds (HTTP 200), masking the data loss entirely.
Fix
supportsVision = falseto bothCerebrasProviderandGroqProviderLLMProviderFactory.buildProviderPlan(), filter providers bysupportsVisionwhenrequest.images?.length > 0, or throwConfigurationErrorbefore the request is dispatched — matching the Cloudflare patternAcceptance criteria
CerebrasProvider.supportsVision === falseandGroqProvider.supportsVision === falseare declaredConfigurationErrorrather than silently discarding themFound by
Codebase audit (automated) — independently flagged by provider-parity and vision-handling audit slices