Skip to content

docs: add crush integration guide - #3181

Merged
steebchen merged 3 commits into
mainfrom
add-llmgateway-provider-crush
Jul 30, 2026
Merged

docs: add crush integration guide#3181
steebchen merged 3 commits into
mainfrom
add-llmgateway-provider-crush

Conversation

@steebchen

@steebchen steebchen commented Jul 22, 2026

Copy link
Copy Markdown
Member

Summary

Adds a Crush (Charm's terminal coding agent) integration guide, documenting the manual crush.json provider setup that works today.

  • apps/docs/content/guides/crush.mdx — docs guide: export LLMGATEWAY_API_KEY, add an openai-compat provider entry (models auto-discovered from /v1/models, no model list to maintain), X-No-Fallback provider pinning, troubleshooting
  • apps/ui/src/content/guides/crush.md — UI guide mirror (content-collections picks it up on /guides)
  • Crush cards added to both integration grids (integration-cards.tsx, integration-guides-grid.tsx) with a new CrushIcon / docs Crush custom icon

An upstream PR to make LLM Gateway a built-in Crush provider is open at charmbracelet/catwalk#458; this guide intentionally does not reference the built-in flow — if that PR ever lands, the guide can be updated to lead with it.

Verification

  • pnpm format and full pnpm build pass (17/17 tasks)
  • crush.json config field names verified against crush's ProviderConfig schema (base_url, type: openai-compat, api_key, extra_headers; model auto-discovery via /v1/models is on by default)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added Crush to the supported LLM Gateway integrations, including a new Crush icon and direct link to its guide.
  • Documentation
    • Updated the Crush + LLM Gateway guide with revised setup steps using a single crush.json provider entry (including openai-compat base_url and LLMGATEWAY_API_KEY), clarified model discovery from /v1/models, and updated “Start Coding” to include the crush launch command.
    • Refined provider locking instructions to use the X-No-Fallback header and renamed the troubleshooting section for “404 Not Found.”

Copilot AI review requested due to automatic review settings July 22, 2026 16:05
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@steebchen, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 22781759-1540-4e60-93f1-c6184e955dba

📥 Commits

Reviewing files that changed from the base of the PR and between 6979a7b and 77e17fb.

📒 Files selected for processing (2)
  • apps/docs/content/guides/crush.mdx
  • apps/docs/lib/custom-icons.tsx

Walkthrough

Adds Crush integration documentation, reusable Crush icons, and active Crush entries to shared and application integration catalogs.

Changes

Crush integration

Layer / File(s) Summary
Crush icon foundation
packages/shared/src/components/integration-icons.tsx, apps/docs/lib/custom-icons.tsx
Adds Crush SVG icon components to the shared and documentation icon registries.
Integration catalog registration
packages/shared/src/components/integration-guides-grid.tsx, apps/ui/src/components/integrations/integration-cards.tsx
Adds Crush as an active integration linking to /guides/crush.
Crush setup and troubleshooting guides
apps/docs/content/guides/crush.mdx, apps/ui/src/content/guides/crush.md
Documents Crush provider configuration through crush.json, /v1/models discovery, model selection, fallback locking, and troubleshooting.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding a Crush integration guide in the docs.
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch add-llmgateway-provider-crush
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-llmgateway-provider-crush

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/docs/content/guides/crush.mdx`:
- Line 3: Remove hardcoded catalogue-derived model and provider claims from both
guides: in apps/docs/content/guides/crush.mdx at lines 3, 10, and 90-94, use
catalogue-agnostic wording, remove repeated counts, and link readers to the live
catalogue instead of listing models; apply the mirrored wording and removals in
apps/ui/src/content/guides/crush.md at lines 5, 9, and 75-79.
- Line 70: Update every manual config example’s api_key value to use the
required environment-variable form `${LLMGATEWAY_API_KEY:?set
LLMGATEWAY_API_KEY}` instead of `$LLMGATEWAY_API_KEY`: apply this in
apps/docs/content/guides/crush.mdx at lines 70-70 and 108-108, and
apps/ui/src/content/guides/crush.md at lines 61-61 and 93-93.
- Around line 96-115: Add a concrete provider-qualified model name to the
locking example in both `apps/docs/content/guides/crush.mdx` (lines 96-115) and
`apps/ui/src/content/guides/crush.md` (lines 81-100), alongside the existing
`X-No-Fallback` configuration. Ensure the example explicitly demonstrates the
intended provider/model routing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1f1db151-3de6-4042-9d38-80f66968175d

📥 Commits

Reviewing files that changed from the base of the PR and between 207f652 and f5e84ea.

📒 Files selected for processing (6)
  • apps/docs/content/guides/crush.mdx
  • apps/docs/lib/custom-icons.tsx
  • apps/ui/src/components/integrations/integration-cards.tsx
  • apps/ui/src/content/guides/crush.md
  • packages/shared/src/components/integration-guides-grid.tsx
  • packages/shared/src/components/integration-icons.tsx

@@ -0,0 +1,147 @@
---
title: Crush Integration
description: Use GPT-5, Claude, Gemini, or any model with Charm's Crush coding agent. One provider entry, 200+ models, full cost tracking.

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove hardcoded catalogue-derived claims from both guides.

  • apps/docs/content/guides/crush.mdx#L3-L3: replace model/count claims in frontmatter with catalogue-agnostic wording.
  • apps/docs/content/guides/crush.mdx#L10-L10: remove the repeated model/provider counts.
  • apps/docs/content/guides/crush.mdx#L90-L94: replace the explicit model list and dynamic claims with a link to the live catalogue.
  • apps/ui/src/content/guides/crush.md#L5-L5: update mirrored frontmatter wording.
  • apps/ui/src/content/guides/crush.md#L9-L9: remove repeated model/provider counts.
  • apps/ui/src/content/guides/crush.md#L75-L79: replace the explicit model list and dynamic claims.
📍 Affects 2 files
  • apps/docs/content/guides/crush.mdx#L3-L3 (this comment)
  • apps/docs/content/guides/crush.mdx#L10-L10
  • apps/docs/content/guides/crush.mdx#L90-L94
  • apps/ui/src/content/guides/crush.md#L5-L5
  • apps/ui/src/content/guides/crush.md#L9-L9
  • apps/ui/src/content/guides/crush.md#L75-L79
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/guides/crush.mdx` at line 3, Remove hardcoded
catalogue-derived model and provider claims from both guides: in
apps/docs/content/guides/crush.mdx at lines 3, 10, and 90-94, use
catalogue-agnostic wording, remove repeated counts, and link readers to the live
catalogue instead of listing models; apply the mirrored wording and removals in
apps/ui/src/content/guides/crush.md at lines 5, 9, and 75-79.

Source: Coding guidelines

Comment thread apps/docs/content/guides/crush.mdx
Comment on lines +96 to +115
## Locking to a Specific Provider

By default, LLM Gateway automatically fails over to alternative providers if your chosen provider is experiencing downtime. If you want to lock into a specific provider/model mapping — for example to guarantee a fixed price or to always use a single provider — pass the `X-No-Fallback` header and pin the provider in the model name:

```json
{
"$schema": "https://charm.land/crush.json",
"providers": {
"llmgateway": {
"name": "LLM Gateway",
"type": "openai-compat",
"base_url": "https://api.llmgateway.io/v1",
"api_key": "$LLMGATEWAY_API_KEY",
"extra_headers": {
"X-No-Fallback": "true"
}
}
}
}
```

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## Relevant guide excerpts\n'
for f in apps/docs/content/guides/crush.mdx apps/ui/src/content/guides/crush.md; do
  echo
  echo "### $f"
  wc -l "$f"
  sed -n '70,130p' "$f"
done

printf '\n## Search for related provider-qualified model wording in repo\n'
rg -n "provider-qualified|X-No-Fallback|no-fallback|LLM Gateway|provider/model mapping|mapping" apps -g '!**/node_modules/**'

printf '\n## Search for crush guide references to model selection\n'
rg -n "provider|model" apps/docs/content/guides/crush.mdx apps/ui/src/content/guides/crush.md

Repository: theopenco/llmgateway

Length of output: 50377


🌐 Web query:

LLM Gateway routing X-No-Fallback provider-qualified model name docs

💡 Result:

In the context of LLM Gateways, the X-No-Fallback header is used to disable automatic provider failover, ensuring a request is routed exclusively to a specified provider [1][2][3]. When using this header, you should specify your target model using a provider-qualified model name (in the format provider/model-name) to ensure the gateway explicitly directs the request to the intended provider [1][4]. Key details regarding this configuration: 1. X-No-Fallback Header: Setting the header X-No-Fallback: true instructs the gateway to bypass automatic retry and fallback mechanisms [1][5]. If the specified provider is unreachable or experiences issues, the request will fail rather than attempting to route to an alternative provider [1][3]. This is typically used for debugging or when specific provider behavior is required [5]. 2. Provider-Qualified Model Names: To ensure precise routing, use the syntax provider/model-name (e.g., openai/gpt-4o or deepseek/deepseek-v3.2) [1][4]. This explicit naming convention signals to the gateway exactly which provider infrastructure should handle the request [1]. 3. Logging and Transparency: When X-No-Fallback is active, gateways often include metadata in logs (such as noFallback: true) to indicate that fallback was intentionally disabled for that specific request [1]. While many gateways support this pattern, implementation specifics can vary [6][7][8]. Always verify against your specific gateway's documentation for exact header and naming requirements [1][4].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "## apps/docs/content/guides/crush.mdx"
nl -ba apps/docs/content/guides/crush.mdx | sed -n '80,130p'

echo
echo "## apps/ui/src/content/guides/crush.md"
nl -ba apps/ui/src/content/guides/crush.md | sed -n '65,115p'

echo
echo "## model/provider selection mentions in both guides"
rg -n -C 2 "(model|provider)" apps/docs/content/guides/crush.mdx apps/ui/src/content/guides/crush.md

Repository: theopenco/llmgateway

Length of output: 236


🏁 Script executed:

python3 - <<'PY'
from pathlib import Path

files = [
    "apps/docs/content/guides/crush.mdx",
    "apps/ui/src/content/guides/crush.md",
]

for path in files:
    print(f"## {path}")
    lines = Path(path).read_text().splitlines()
    start = 70 if "docs/content" in path else 55
    end = 125 if "docs/content" in path else 110
    for i in range(start - 1, min(end, len(lines))):
        print(f"{i+1:4d}: {lines[i]}")
    print()

print("## explicit provider-qualified model syntax search")
for path in files:
    text = Path(path).read_text().splitlines()
    for i, line in enumerate(text, 1):
        if "provider/" in line or "openai/" in line or "deepseek/" in line:
            print(f"{path}:{i}: {line}")
PY

Repository: theopenco/llmgateway

Length of output: 5008


Add a concrete provider/model example in both Crush guides. X-No-Fallback is shown, but the provider-qualified model name that makes the routing intent explicit is still missing from the example.

📍 Affects 2 files
  • apps/docs/content/guides/crush.mdx#L96-L115 (this comment)
  • apps/ui/src/content/guides/crush.md#L81-L100
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/guides/crush.mdx` around lines 96 - 115, Add a concrete
provider-qualified model name to the locking example in both
`apps/docs/content/guides/crush.mdx` (lines 96-115) and
`apps/ui/src/content/guides/crush.md` (lines 81-100), alongside the existing
`X-No-Fallback` configuration. Ensure the example explicitly demonstrates the
intended provider/model routing.

Source: MCP tools

steebchen and others added 3 commits July 30, 2026 14:28
Adds a Crush (charmbracelet/crush) integration guide to docs and UI,
plus Crush cards/icons in the integration grids. Companion to
charmbracelet/catwalk#458 which adds LLM Gateway as a built-in
provider in Crush.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Assume charmbracelet/catwalk#458 is merged: built-in provider flow is
the primary path, manual crush.json config demoted to an optional
customization section. Merge once the native integration is live.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The catwalk built-in provider PR isn't landing, so drop all built-in
provider mentions and document the manual crush.json provider entry
as the setup path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@steebchen
steebchen force-pushed the add-llmgateway-provider-crush branch from 6979a7b to 77e17fb Compare July 30, 2026 13:33
@steebchen
steebchen added this pull request to the merge queue Jul 30, 2026
Merged via the queue into main with commit e803b8d Jul 30, 2026
11 checks passed
@steebchen
steebchen deleted the add-llmgateway-provider-crush branch July 30, 2026 14:02
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