LLM Gateway

Crush Integration

Connect Crush to LLM Gateway, discover models, and verify a coding task.

Crush is a terminal coding agent. Connect its OpenAI-compatible provider to LLM Gateway with a pay-as-you-go or DevPass key.

Video walkthrough

Install

pnpm add -g @charmland/crush
crush --version

Other installation options are in the Crush documentation.

Connect LLM Gateway

Create an API key in your dashboard, then export it in the terminal where you run Crush:

export LLMGATEWAY_API_KEY="your_api_key"

Add this provider to your project's crush.json, merging it with existing settings:

{
	"providers": {
		"llmgateway": {
			"name": "LLM Gateway",
			"type": "openai",
			"base_url": "https://api.llmgateway.io/v1",
			"api_key": "$LLMGATEWAY_API_KEY"
		}
	}
}

The key stays in your environment. Crush discovers the available models from the gateway when no explicit model list is configured.

Choose a model and code

cd your-project
crush

Select LLM Gateway and a model with tool support from the live catalogue. With DevPass, choose a canonical model ID supported by your plan, without an upstream provider prefix.

Start with a small task that has a clear test. Review tool permission requests, inspect the changes, and run the tests. Check usage in the workspace that issued your API key.

Troubleshooting

  • Authentication failed: Check that LLMGATEWAY_API_KEY is exported in the same terminal and the key is active.
  • Models missing: Restart Crush after editing the provider configuration. Check the endpoint and key before adding a manual model list.
  • Tool calls fail: Confirm the selected model supports tools.
  • Provider unavailable: Gateway fallback can route requests to another eligible provider. See the routing documentation for pinning and fallback controls.

See the Crush configuration reference for permissions and additional settings.

How is this guide?

On this page

Ready for production?

Ship to production with SSO, audit logs, spend controls, and guardrails your security team will approve.

Explore Enterprise