Skip to content

feat(meta): Add pricing and capabilities configuration - #885

Open
mayankjain-panw wants to merge 3 commits into
mainfrom
feat/meta-provider-support
Open

feat(meta): Add pricing and capabilities configuration#885
mayankjain-panw wants to merge 3 commits into
mainfrom
feat/meta-provider-support

Conversation

@mayankjain-panw

@mayankjain-panw mayankjain-panw commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds pricing and model capabilities configuration for Meta AI provider (Muse Spark models).

Changes

  • pricing/meta.json — Token pricing for all 3 models + default zero-cost baseline + web_search billing
  • general/meta.json — Model parameters and capability declarations

Pricing Source (from Meta docs)

Model Input ($/1M) Output ($/1M) Cached ($/1M) Web Search ($/1K)
muse-spark-1.1 $1.25 $4.25 $0.15 $2.50
muse-spark-1.2 $1.25 $4.25 $0.15 $2.50
muse-spark-1.2-contributor $0.10 $0.20 $0.002 $2.50

Conversion: price_value = dollars_per_million / 10_000 (verified against x-ai and anthropic entries).

Web search: 0.0025 = $2.50/1000 per-query rate (same unit convention as x-ai web_search field).

Capabilities (general/meta.json)

  • Context window: 1,048,576 tokens
  • Primary type: chat
  • Supported: tools, image, video
  • Message roles: system, developer, user, assistant, tool
  • stop parameter intentionally omitted (Meta rejects on reasoning models)
  • n parameter omitted (only n=1 supported)

Pricing Structure (pricing/meta.json)

  • default entry: zero-cost baseline for unrecognized models
  • Per-model entries with request_token, response_token, cache_read_input_token, cache_write_input_token ($0), additional_units.web_search
  • calculate.request: sum of (input_tokens * rate) + (cache_read_input_tokens * cache_rate)
  • calculate.response: output_tokens * rate

Validation

Both JSON files pass JSON.parse() validation. 112 insertions, 2 new files.

Related PRs

  • Gateway: Portkey-AI/gateway-enterprise-node#1907
  • Albus: Portkey-AI/albus#2477
  • Protego: Portkey-AI/protego#97
  • Luna: Portkey-AI/luna#1963

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Meta provider configuration to the models repository by introducing token pricing and model capability/parameter metadata for Muse Spark models, enabling downstream systems to price requests and understand supported features.

Changes:

  • Added pricing/meta.json with per-model token and cached-token pricing (plus a default baseline pricing config).
  • Added general/meta.json with provider/model parameter definitions and declared supported modalities (tools/image/video).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
pricing/meta.json Introduces Meta Muse Spark pricing configuration and a default cost calculation formula.
general/meta.json Declares Meta Muse Spark model parameters and capabilities (tools/image/video).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pricing/meta.json
Comment thread pricing/meta.json

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (1)

pricing/meta.json:29

  • calculate.request references cache_read_input_tokens, but the pricing schema/examples elsewhere in this repo use the metric name cache_read_tokens (and cache_write_tokens). As written, cached-token usage will likely be excluded from cost calculation, and cache-write costs won’t be counted if they become non-zero in the future.
            {
              "operation": "multiply",
              "operands": [
                { "value": "cache_read_input_tokens" },
                { "value": "rates.cache_read_input_token" }
              ]

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