Skip to content

Meta Muse (Meta Model API) provider support — validated branch ready, PR creation restricted #817

Description

@hongnoul

Summary

Adds Meta's new Model API (Muse Spark family) as an OpenAI-compatible provider, following the same pattern as Celeris/Xiaomi MiMo.

  • New META_MUSE_PROFILE / META_MUSE_LOGIN_PROVIDER catalog entries
    • base URL https://api.meta.ai/v1, key env META_MUSE_API_KEY, default model muse-spark-1.2
  • jcode login meta-muse / --provider meta-muse with aliases meta, muse, muse-spark, meta-model-api, meta-ai
  • Static muse-spark-1.2 / muse-spark-1.1 fallback so models are selectable immediately after login, before the live /models refresh
  • 1,048,576-token context limit for the muse-spark family
  • README provider list updated

Bonus fixes found during validation

  • provider-doctor tool-smoke cap: the live tool-call probe capped output at 256 tokens; Muse Spark burns ~220 hidden reasoning tokens before emitting the tool call, so the completion ended at finish_reason: length with no tool_calls, failing a model that handles tools fine. Raised to 1,024 (still a positive multiple of 256, so Celeris-compatible).
  • copilot auth test isolation: save_github_token_makes_future_loads_available fails on any machine with GITHUB_TOKEN/GH_TOKEN exported, because env tokens win over the persisted fixture in load_github_token(). The test now clears and restores those vars.

Tests

  • bare_meta_muse_model_id_routes_to_meta_muse_profile: bare muse-spark-1.2 routes to the meta-muse profile from any active provider (mirrors the Celeris regression test)
  • muse_spark_family_resolves_to_one_million_context
  • All suites green on this branch: jcode-base 1253 passed, provider-core 121 passed, provider-metadata 14 passed, 0 failures

Verification

jcode provider-doctor meta-muse --tier full with a real Model API key: READY, every strict checkpoint passes:

  • Credential loaded, live catalog (3 models), catalog hot reload, picker, model-switch route
  • Non-streaming + streaming chat completions
  • Tool-call parse / execution loop / tool-result followup / real jcode tool smoke

Offline tier also passes with the static-model fallback (no key).

Metadata

Metadata

Assignees

No one assigned

    Labels

    autonomous: noNeeds your brain: a product/design decision is required before anyone acts.enhancementNew feature or requesttriage: needs-decisionNeeds maintainer decision/design thought

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions