fix(catalog): omit Responses penalties on all first-party xAI models

xAI's /v1/responses rejects presence/frequency penalties for every Grok
model, not only reasoners. Gate supportsPenaltyAndStopParams on isXaiHost
so xai/grok-2 no longer serializes presence_penalty.
This commit is contained in:
Yang Yang
2026-08-09 22:55:10 -07:00
parent 76faddf886
commit 86866b8bbf
7 changed files with 25 additions and 9 deletions
+1
View File
@@ -242,6 +242,7 @@ Both the paid API-key provider (`xai` / `XAI_API_KEY`) and SuperGrok OAuth
- omit `reasoning.effort` unless the model is on the Grok effort-capable allowlist
- omit `reasoning.summary` (the host rejects it; do not fall back to `"auto"`)
- omit presence/frequency penalties (`/v1/responses` rejects them for every Grok model)
- include `reasoning.encrypted_content` on the request
- replay encrypted reasoning items on later turns