Skip to content

feat(catalog): add Meta's muse-spark-1.1 as a direct provider#774

Open
steventohme wants to merge 1 commit into
mainfrom
add-muse-spark-1-1
Open

feat(catalog): add Meta's muse-spark-1.1 as a direct provider#774
steventohme wants to merge 1 commit into
mainfrom
add-muse-spark-1-1

Conversation

@steventohme

Copy link
Copy Markdown
Collaborator

What

Onboards muse-spark-1.1 (Meta Superintelligence Labs' first paid model, Meta Model API public preview, US-only since 2026-07-09) as a servable catalog entry via a direct first-party binding — Stage A of the add-router-model skill.

  • Direct Meta Model API binding (per user decision — not OpenRouter): $1.25/$4.25 per MTok in/out, cached input $0.15 (0.12 multiplier), native 1M context (1,048,576 per Meta docs).
  • openaiReasoning capability spec (low/medium/high reasoning_effort); upstream also accepts minimal/xhigh but those clamp to the nearest supported level rather than 400ing, matching the existing GPT-5.x pattern.
  • /force-model aliases: meta, muse, muse-spark, musespark.

What this is NOT

Not yet a routable cluster-scorer target (Stage C). No bake-off shards exist for this model — GCS, EXPERIMENTS.md, and mine_bakeoff_priors.py were all checked and confirmed empty prior to this PR. A follow-up will run the solo bake-off (harness-faithful Pro/Atlas + Tier-3 Easy capability probe), then earn it a roster slot in balanced (per user's spend/roster call), following the hmm-add-model-prior skill.

Checklist (per internal/router/catalog/CLAUDE.md + internal/providers/CLAUDE.md)

  • catalog.go — one Model{} literal, bare ID (first-party, not meta/-prefixed, matching the xAI Grok precedent)
  • model.go — capability-spec registry entry
  • force_model.go — user-facing aliases
  • Three-map provider edit: ProviderMeta constant + ProviderFamilies (FamilyOpenAICompat) + APIKeyEnvVars (META_API_KEY)
  • openaicompat.MetaBaseURL constant (https://api.meta.ai/v1)
  • cmd/router/main.goregisterDeploymentKeyedProvider wiring (mirrors the XAI/Together shape)
  • Non-family-based dispatch switches reviewed per internal/providers/CLAUDE.md step 5:
    • emit_openai.go's applySessionAffinity → added to defaultMechanismProviders (generic x-session-affinity; Meta's docs don't document a bespoke stickiness header)
    • rl/mapping.go's rosterIDFor → explicit meta/ prefix (consistent with the OpenRouter-style roster slug convention)
  • catalog_test.go canonical-provider set, pricing_test.go row
  • go run ./cmd/genprices — regenerated install/install.sh + install/cc-statusline.sh
  • go build ./... + go test ./... + go vet ./... all green

Verification

Full test suite green against fresh origin/main. Follows the Together/XAI onboarding precedent (router#546, #559) for the dispatch-switch review checklist — the family-driven refactor since that PR meant credential extraction and cross-format dispatch needed zero edits here.

Meta Superintelligence Labs' first paid model (Meta Model API public
preview, US-only since 2026-07-09). Direct first-party OpenAI-compat
binding ($1.25/$4.25 per MTok, 1M native context), no OpenRouter
fallback yet. Servable-only (Stage A) — not yet a cluster-scorer
routing target; roster onboarding with a data-derived HMM prior is a
follow-up once bake-off evidence exists.

- providers.ProviderMeta + APIKeyEnvVars/ProviderFamilies (three-map edit)
- openaicompat.MetaBaseURL (https://api.meta.ai/v1)
- catalog.go Model entry, model.go capability spec (openaiReasoning)
- force_model.go aliases (meta/muse/muse-spark/musespark)
- cmd/router/main.go registerDeploymentKeyedProvider wiring
- rl/mapping.go roster prefix (meta/), translate session-affinity
  default-mechanism coverage, catalog_test.go canonical-provider set
- pricing_test.go row + regenerated install.sh/cc-statusline.sh price
  tables (cmd/genprices)
@claude

claude Bot commented Jul 17, 2026

Copy link
Copy Markdown

Claude finished @steventohme's task —— View job


Posted 4 comment-length suggestions (advisory, won't block merge).

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ace3832. Configure here.

Comment thread internal/router/model.go
// so it shares openaiReasoning's low/medium/high; a request for xhigh or
// minimal clamps to the nearest of those (nearestReasoningLevel) rather
// than 400ing.
"muse-spark-1.1": openaiReasoning,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing max-output token cap

High Severity

muse-spark-1.1 is registered with CapReasoning (openaiReasoning) but has no modelMaxOutputTokens entry. Emit then clamps max_completion_tokens to the 8192 default via clampToModelOutputCap. Peer CapReasoning models (GPT-5.x, grok-4.5) use 128k–131k caps; Meta documents a much larger output budget. Claude Code's typical 32k–64k max_tokens would be cut down, so reasoning can exhaust the budget and truncate tool calls or content.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ace3832. Configure here.

@workweave-bot workweave-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Advisory only — comment-length nits. Won't block merge.

Comment on lines +37 to +40
// MetaBaseURL is Meta Superintelligence Labs' Model API — first-party
// upstream for muse-spark-1.1, in public preview (US-only) since
// 2026-07-09. OpenAI-compatible Chat Completions surface; model IDs match
// the router's public slug so no modelIDMap rewrite is needed.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// MetaBaseURL is Meta Superintelligence Labs' Model API — first-party
// upstream for muse-spark-1.1, in public preview (US-only) since
// 2026-07-09. OpenAI-compatible Chat Completions surface; model IDs match
// the router's public slug so no modelIDMap rewrite is needed.
// MetaBaseURL is Meta Superintelligence Labs' first-party Model API
// (public preview, US-only since 2026-07-09).

Was 4 lines; the last 2 restate what the constant name and value already show (OpenAI-compat surface, no ID rewrite needed).

Comment on lines +327 to +334
// --- Meta --- Muse Spark 1.1, GA 2026-07-09 (Meta's first paid model,
// Meta Model API public preview, US-only). Bare ID (not "meta/"-prefixed):
// direct first-party API like Anthropic/OpenAI/Google/xAI, not an
// aggregator-hosted OSS entry. Native 1M context (Meta docs list
// 1,048,576). Strong agentic/tool-use, mid-pack coding (SWE-Bench Pro
// 61.5 vs opus-4.8's 69.2) — priced accordingly below the high tier's
// flagships. Meta is the only wired provider (first-party, no OpenRouter
// fallback yet); add one if/when it earns roster traffic.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// --- Meta --- Muse Spark 1.1, GA 2026-07-09 (Meta's first paid model,
// Meta Model API public preview, US-only). Bare ID (not "meta/"-prefixed):
// direct first-party API like Anthropic/OpenAI/Google/xAI, not an
// aggregator-hosted OSS entry. Native 1M context (Meta docs list
// 1,048,576). Strong agentic/tool-use, mid-pack coding (SWE-Bench Pro
// 61.5 vs opus-4.8's 69.2) — priced accordingly below the high tier's
// flagships. Meta is the only wired provider (first-party, no OpenRouter
// fallback yet); add one if/when it earns roster traffic.
// --- Meta --- Muse Spark 1.1, first-party (bare ID, not "meta/"-prefixed,
// matching xAI precedent). Single provider; add OpenRouter fallback if/when
// it earns roster traffic.

Was 8 lines; SWE-bench scores and context-window verbosity don't belong in catalog source. The genuine WHYs (bare-ID convention, single-provider note) fit in 3.

Comment thread internal/router/model.go
Comment on lines +170 to +175
// muse-spark-1.1: OpenAI-compat reasoning_effort, mandatory (cannot
// disable), supports minimal/low/medium/high/xhigh upstream — but neither
// tier is in router.ReasoningCapabilities.Levels' ordered vocabulary yet,
// so it shares openaiReasoning's low/medium/high; a request for xhigh or
// minimal clamps to the nearest of those (nearestReasoningLevel) rather
// than 400ing.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// muse-spark-1.1: OpenAI-compat reasoning_effort, mandatory (cannot
// disable), supports minimal/low/medium/high/xhigh upstream — but neither
// tier is in router.ReasoningCapabilities.Levels' ordered vocabulary yet,
// so it shares openaiReasoning's low/medium/high; a request for xhigh or
// minimal clamps to the nearest of those (nearestReasoningLevel) rather
// than 400ing.
// muse-spark-1.1: reasoning_effort mandatory; upstream also accepts
// minimal/xhigh but those clamp via nearestReasoningLevel rather than 400.

Was 6 lines; "OpenAI-compat" and the registry/vocabulary detail are noise — the only non-obvious fact is the clamp-not-400 behavior.

Comment on lines +49 to +51
// Meta's docs advertise prompt caching but don't document a stickiness
// header (unlike xAI's x-grok-conv-id) — generic x-session-affinity is
// the safe default until proven otherwise.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Meta's docs advertise prompt caching but don't document a stickiness
// header (unlike xAI's x-grok-conv-id) — generic x-session-affinity is
// the safe default until proven otherwise.
// Meta's API has no documented stickiness header (unlike xAI's x-grok-conv-id).

Was 3 lines; the WHY fits in one.

@greptile-apps

greptile-apps Bot commented Jul 17, 2026

Copy link
Copy Markdown

T-Rex T-Rex Logs

What T-Rex did

  • Validated that changes to catalog/roster/pricing/session-affinity related packages passed, including TestLookup/muse-spark-1.1, TestRosterIDForMatchesActualBehavior/meta, and TestSessionAffinityMechanismMatchesActualBehavior/meta.
  • Validated that changes to provider/openai compat/proxy packages passed.
  • Validated that router package tests and the cmd/router build passed.
  • Validated the full Go toolchain went through go test ./..., go build ./..., and go vet ./... with all commands exiting cleanly.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "feat(catalog): add Meta's muse-spark-1.1..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants