mirror of
https://github.com/ultraworkers/claw-code.git
synced 2026-04-11 10:32:08 +08:00
MessageRequest now carries OpenAI-compatible tuning params (c667d47), but the Anthropic API does not support frequency_penalty or presence_penalty, and uses 'stop_sequences' instead of 'stop'. Without this fix, setting these params with a Claude model would produce 400 errors. Changes to strip_unsupported_beta_body_fields: - Remove frequency_penalty and presence_penalty from Anthropic request body - Convert stop → stop_sequences (only when non-empty) - temperature and top_p are preserved (Anthropic supports both) Tests added: - strip_removes_openai_only_fields_and_converts_stop - strip_does_not_add_empty_stop_sequences 87 api lib tests passing, 0 failing. cargo check --workspace: clean.