Skip to content

feat(config): add grok-4.7 to the xAI model catalog - #113

Merged
lg2m merged 1 commit into
mainfrom
feat/xai-grok-4-7-catalog
Sep 22, 2026
Merged

lg2m merged 1 commit into
mainfrom
feat/xai-grok-4-7-catalog

Conversation

@lg2m

@lg2m lg2m commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds grok-4.7 to the builtin xAI model catalog so it can be selected as xai/grok-4.7.

There is no runtime/provider change: the xAI provider already targets https://api.x.ai/v1, and models are a hand-maintained table in crates/qq-config/src/models.rs. This adds one row plus test coverage.

User-visible behavior

  • QQ_MODEL=xai/grok-4.7 (or --model xai/grok-4.7) now resolves, with display name Grok 4.7, reasoning enabled, and served over the OpenAI Responses protocol like grok-4.6/grok-4.5.
  • Limits: 500k context / 500k output.
  • Pricing: $2 / $6 per M tokens, $0.50 cache read; above 200k input tokens, $4 / $12 with $1.00 cache read (same shape as 4.6).

Design notes

  • Catalog values were taken from models.dev/api.json (xai → grok-4.7, released 2026-09-21). PROVENANCE is bumped to models.dev/api.json@2026-09-21 so every builtin pricing record reports the snapshot it actually came from.
  • The Harbor eval-config.ron LiteLLM us.xai.grok-4.6 entry is untouched; that is a separate gateway catalog with its own rates.

Verification

  • cargo test -p qq-config — 89 passed (catalog test now asserts grok-4.7 canonical id, protocol, name, reasoning, limits, base + tiered pricing, provenance)
  • cargo test -p qq --bin qq constructs_xai_runtimes — passes; runtime planning covers xai/grok-4.7
  • cargo fmt --all -- --check — clean
  • cargo clippy -p qq-config --all-targets --all-features -- -D warnings — clean

Not exercised live against the xAI API.

Performance / compatibility

One additional static catalog entry; no hot-path impact. Additive only — existing model ids and routes are unchanged.

Tracking

Linear could not be queried from this session (the linear_mcp connection needs reauthorization), so no DEV issue is linked yet.

Add the grok-4.7 row to the builtin xAI catalog (xai/grok-4.7, Grok 4.7,
reasoning, 500k/500k limits, tiered pricing over 200k input, served over
the Responses API) and bump the catalog provenance to the models.dev
snapshot it was taken from (2026-09-21).

The existing catalog and runtime tests now cover grok-4.7 alongside the
older Grok releases.
@lg2m
lg2m merged commit 7f5cf0a into main Sep 22, 2026
4 checks passed
@lg2m
lg2m deleted the feat/xai-grok-4-7-catalog branch September 22, 2026 01:12
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