docs: add crush integration guide - #3181
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 33 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughAdds Crush integration documentation, reusable Crush icons, and active Crush entries to shared and application integration catalogs. ChangesCrush integration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1⚔️ Resolve merge conflicts 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (6)
apps/docs/content/guides/crush.mdxapps/docs/lib/custom-icons.tsxapps/ui/src/components/integrations/integration-cards.tsxapps/ui/src/content/guides/crush.mdpackages/shared/src/components/integration-guides-grid.tsxpackages/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. | |||
There was a problem hiding this comment.
📐 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-L10apps/docs/content/guides/crush.mdx#L90-L94apps/ui/src/content/guides/crush.md#L5-L5apps/ui/src/content/guides/crush.md#L9-L9apps/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
| ## 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" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` |
There was a problem hiding this comment.
🎯 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.mdRepository: 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:
- 1: https://docs.llmgateway.io/features/routing
- 2: https://llmgateway.io/changelog/retry-fallback
- 3: https://docs.llmgateway.io/guides/continue
- 4: https://github.com/tangle-network/tangle-docs/blob/main/pages/gateway/models.mdx
- 5: https://llmgateway.io/blog/how-we-handle-llm-provider-failover
- 6: https://github.com/vahid8/llm-gateway
- 7: https://docs.omi.me/doc/developer/backend/llm_gateway
- 8: https://docs.obot.ai/functionality/llm-gateway/
🏁 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.mdRepository: 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}")
PYRepository: 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
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>
6979a7b to
77e17fb
Compare
Summary
Adds a Crush (Charm's terminal coding agent) integration guide, documenting the manual
crush.jsonprovider setup that works today.apps/docs/content/guides/crush.mdx— docs guide: exportLLMGATEWAY_API_KEY, add anopenai-compatprovider entry (models auto-discovered from/v1/models, no model list to maintain),X-No-Fallbackprovider pinning, troubleshootingapps/ui/src/content/guides/crush.md— UI guide mirror (content-collections picks it up on/guides)integration-cards.tsx,integration-guides-grid.tsx) with a newCrushIcon/ docsCrushcustom iconAn 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 formatand fullpnpm buildpass (17/17 tasks)crush.jsonconfig field names verified against crush'sProviderConfigschema (base_url,type: openai-compat,api_key,extra_headers; model auto-discovery via/v1/modelsis on by default)🤖 Generated with Claude Code
Summary by CodeRabbit
crush.jsonprovider entry (includingopenai-compatbase_urlandLLMGATEWAY_API_KEY), clarified model discovery from/v1/models, and updated “Start Coding” to include thecrushlaunch command.X-No-Fallbackheader and renamed the troubleshooting section for “404 Not Found.”