Kimi documents max 5 stop strings AND <= 32 bytes per string at https://platform.kimi.ai/docs/api/chat. The previous code capped count but forwarded oversize entries, which can produce upstream 400s. Add stop_max_bytes=32 on the Kimi registry entry and apply both checks in a new _normalize_stop_for_provider helper shared between the default OAI-compat path and the Kimi web-search bypass. Tests pin the byte-cap drop on both Kimi paths. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| _html_to_md.py | ||
| anthropic_compat.py | ||
| audio_codecs.py | ||
| chat_template_helpers.py | ||
| defaults.py | ||
| external_provider.py | ||
| inference.py | ||
| key_exchange.py | ||
| llama_cpp.py | ||
| llama_server_args.py | ||
| mlx_inference.py | ||
| orchestrator.py | ||
| pricing.py | ||
| providers.py | ||
| safetensors_agentic.py | ||
| tool_call_parser.py | ||
| tools.py | ||
| worker.py | ||