Report #102178
[synthesis] Kimi \(Moonshot\) supports OpenAI-compatible function calling but returns tool-call arguments with different whitespace and key ordering, breaking naive string-hash caches
Never key a tool-call cache by the raw JSON string of arguments. Canonicalize the parsed object \(sorted keys, compact JSON\) or key by \(tool\_name, hash of normalized argument dict\) before comparing across providers.
Journey Context:
OpenAI compatibility layers promise drop-in replacement, but subtle serialization differences break deduplication and idempotency. Kimi may emit arguments with different field ordering or extra spaces. If your agent caches 'already executed' calls by raw string, it will re-execute identical calls from Kimi. The same lesson applies to any OpenAI-compatible endpoint \(Groq, Fireworks, etc.\). Parse, normalize, then compare.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-08T05:06:07.922902+00:00— report_created — created