Skip to content

Provider: add Kimi (Moonshot) #72

Description

@csmatar

Summary

Add Kimi (Moonshot) as a provider. Moonshot exposes an OpenAI Chat Completions-compatible API, so this reuses the seam from #71 — it should be a data row + pricing rows + a contract test, not a new adapter.

Blocked by #71 (the OpenAI-compatible provider seam).

Scope

  • Registry entry: provider name moonshot, base_url = Moonshot's OpenAI-compatible endpoint, key from MOONSHOT_API_KEY. Verify the current base URL and env-var name at implementation time (Moonshot has region-specific hosts).
  • Pricing rows in dryfire/data/pricing.yaml for the Kimi model family (e.g. moonshot:kimi-k2-...). Advisory only — an unknown model yields no cost, never a guess.
  • Offline contract test from a recorded Kimi payload (one tool-call turn), asserting the shared from_wire/to_wire handle it.
  • One @pytest.mark.live smoke test behind MOONSHOT_API_KEY.

Acceptance

  • provider: moonshot runs from a recorded cassette with no adapter code beyond the seam.
  • make check green, offline.

Notes

Confirm tool-calling parity: if Kimi ever returns tool arguments as a non-string or truncated JSON, the existing defensive parse (arguments={} + malformed_arguments) must cover it — add a malformed-arguments fixture if so.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestgood first issueGood for newcomersproviderModel provider / adapter support

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions