Skip to content

feat(providers): add Meta Muse Spark 1.1 provider#5538

Merged
waleedlatif1 merged 2 commits into
stagingfrom
worktree-add-model-muse-spark
Jul 9, 2026
Merged

feat(providers): add Meta Muse Spark 1.1 provider#5538
waleedlatif1 merged 2 commits into
stagingfrom
worktree-add-model-muse-spark

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Add new BYOK-only meta provider for Meta's just-launched Meta Model API
  • Wire up muse-spark-1.1: 1M context, streaming, tool-calling, reasoning_effort (minimal→xhigh), structured output
  • Add Meta icon mark (not wordmark) with theme-safe gradient IDs
  • Not added to hosted models — BYOK only, no auto-billing

Type of Change

  • New feature

Testing

Tested manually. providers/models.test.ts + providers/attachments.test.ts pass (32/32). Verified pricing/context/reasoning-effort values against Meta's live docs (dev.meta.ai).

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

- New BYOK-only meta provider for Meta's Model API (launched today)
- muse-spark-1.1: 1M context, streaming, tool-calling, reasoning_effort
  (minimal->xhigh), structured output
- Meta icon mark only (no wordmark), theme-safe gradient IDs via useId()
- Not added to hosted models list - BYOK only, no auto-billing
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 9, 2026 6:31pm

Request Review

@cursor

cursor Bot commented Jul 9, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Adds a large new execution path (tools, streaming, structured output) that talks to an external API, but it mirrors existing OpenAI-compatible providers and is BYOK-only with no hosted billing changes.

Overview
Introduces Meta as a bring-your-own-key provider targeting https://api.meta.ai/v1, alongside catalog entry for muse-spark-1.1 (1M context, pricing, reasoning_effort levels) and a MetaIcon for the UI.

The new metaProvider adapter uses the OpenAI SDK for chat completions with streaming, tool loops, and JSON schema output. It encodes Meta-specific limits: tool_choice is effectively auto only (forced/none choices are warned or omitted so requests don’t 400), response_format is deferred when tools are active, and post-tool streaming/final structured calls drop tools from the payload instead of sending tool_choice: "none". meta is registered in the provider registry/types/utils and treated like Sakana for attachments (explicitly no file support) and token heuristics.

Reviewed by Cursor Bugbot for commit 6e32706. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds Meta as a new BYOK provider for Muse Spark. The main changes are:

  • New Meta provider implementation for chat, streaming, tools, and structured output.
  • Meta model metadata, registry wiring, tokenization defaults, and attachment handling.
  • Meta icon support in the provider UI.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
apps/sim/providers/meta/index.ts Adds the Meta provider request flow for API-key validation, chat completions, streaming, tool use, and structured output.
apps/sim/providers/models.ts Adds Meta provider metadata, model capabilities, pricing, context window, and icon wiring.
apps/sim/providers/registry.ts Registers the Meta provider in the executable provider registry.
apps/sim/providers/types.ts Adds Meta to the provider identifier type.
apps/sim/providers/attachments.ts Adds Meta to attachment capability handling and marks file attachments unsupported for this adapter.
apps/sim/providers/meta/utils.ts Adds a Meta streaming wrapper around the shared OpenAI-compatible stream utility.

Reviews (2): Last reviewed commit: "fix(providers): stop sending unsupported..." | Re-trigger Greptile

Comment thread apps/sim/providers/types.ts
Comment thread apps/sim/providers/meta/index.ts
Comment thread apps/sim/providers/meta/index.ts
Meta's Chat Completions endpoint only supports tool_choice: "auto" -
"none", "required", and named-function choices all return HTTP 400
(confirmed against the official meta-model-cookbook tool-calling
recipe). Never set tool_choice on the request (auto is already the
default; forced-tool usage control degrades gracefully to auto with a
warning log instead of failing every tool-using run), and drop `tools`
entirely from the two post-tool-loop tool-free completion calls
instead of trying to force tool_choice: "none".
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 6e32706. Configure here.

@waleedlatif1 waleedlatif1 merged commit 29c01fe into staging Jul 9, 2026
18 checks passed
@waleedlatif1 waleedlatif1 deleted the worktree-add-model-muse-spark branch July 9, 2026 18:40
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.

1 participant