Skip to content

fix: accept Cerebras tool calls without content#88

Merged
stackbilt-admin merged 1 commit into
mainfrom
fix/cerebras-tool-content
Jun 7, 2026
Merged

fix: accept Cerebras tool calls without content#88
stackbilt-admin merged 1 commit into
mainfrom
fix/cerebras-tool-content

Conversation

@stackbilt-admin

Copy link
Copy Markdown
Member

Summary

  • Allow Cerebras OpenAI-compatible tool-call responses to omit choices[].message.content.
  • Keep formatting behavior unchanged: omitted content normalizes to an empty assistant content string.
  • Add a regression test for zai-glm-4.7 tool calls where message.content is absent.

Why

AEGIS gateway model-quality eval reached Cerebras after the llm-gateway developer-role compatibility fix, then failed on schema drift:

Response schema drift at choices[0].message.content: expected string-or-null, got undefined

That shape is recoverable and matches the tolerance already used for Groq/Cloudflare OpenAI-compatible tool-call responses.

Validation

  • npm run typecheck
  • npm test (442/442)

Notes

  • Focused provider-contract change only.
  • Did not include incidental package-lock version refresh from dependency install.

@stackbilt-admin stackbilt-admin merged commit a56331d into main Jun 7, 2026
2 checks passed
@stackbilt-admin stackbilt-admin deleted the fix/cerebras-tool-content branch June 7, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant