Skip to content

Coding Plan API Providers (Z.AI, Moonshot, MiniMax) #104

@davidste

Description

@davidste

Summary

Add coding-plan API provider support for:

  • Z.AI coding plans
  • Moonshot/Kimi coding APIs
  • MiniMax coding APIs

This issue covers API-key compatible coding-plan integrations (not OAuth subscription adapters).

Depends On

Why This Issue Exists

  • Loomkin currently includes zai paths but coding-plan provider coverage is incomplete.
  • req_llm runtime in this repo does not currently expose Moonshot/MiniMax provider modules by default.
  • Provider/model discovery and cost handling need explicit integration work for these providers.

Scope

Provider integration strategy

  • Implement a verified strategy for Moonshot/MiniMax in Loomkin runtime:
    • register custom providers, or
    • adopt dependency update that exposes required providers.
  • Keep strategy explicit in code/docs so rollout is deterministic.

Model routing + discovery

  • Extend Loomkin model/provider discovery to surface supported coding-plan providers.
  • Ensure users can select these providers from current model selection UX.
  • Preserve compatibility with direct provider:model string entry.

Config

  • Add submit-ready .loomkin.toml config support for coding-plan providers:
    • base URLs
    • API keys (env interpolation)
    • optional provider mode (OpenAI-compatible vs Anthropic-compatible where relevant)

Cost/budget behavior

  • Define and implement pricing behavior for coding-plan providers:
    • explicit per-model pricing table where possible
    • deterministic fallback behavior when provider usage does not include total_cost
  • Keep rate limiter/budget logic stable.

Out of Scope

  • OAuth login/refresh/revoke lifecycle.
  • Anthropic/Codex/Gemini subscription OAuth adapters.

Acceptance Criteria

  • Z.AI coding-plan path is fully integrated and selectable.
  • Moonshot coding-plan path is integrated with a verified runtime provider strategy.
  • MiniMax coding-plan path is integrated with a verified runtime provider strategy.
  • .loomkin.toml coding-plan config is implemented and validated.
  • Cost and budget behavior for coding-plan usage is deterministic and tested.
  • Integration tests cover model selection, provider call success, and invalid config/key cases.

Implementation Touchpoints

  • lib/loomkin/models.ex
  • lib/loomkin/config.ex
  • lib/loomkin/teams/pricing.ex
  • lib/loomkin/teams/cost_tracker.ex
  • lib/loomkin/teams/agent.ex
  • lib/loomkin_web/live/model_selector_component.ex
  • mix.exs / mix.lock (if dependency strategy requires updates)

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions