From 148bb3c845efedcc8ec68c2c672055fd204acfef Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 21 Jan 2026 17:40:20 -0300 Subject: [PATCH] docs: update crush.md (#159) Signed-off-by: Carlos Alexandro Becker --- CRUSH.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/CRUSH.md b/CRUSH.md index 133421d942d38fe18e88750f6e521cb0daf62123..ef9e3cc87e236689b3949b2eb712b23100394898 100644 --- a/CRUSH.md +++ b/CRUSH.md @@ -2,12 +2,9 @@ ## Build/Test Commands -- `go build` - Build the main HTTP server -- `go build ./cmd/openrouter` - Build OpenRouter config generator +- `go run .` - Build and run the main HTTP server on :8080 +- `go run ./cmd/{provider-name}` - Build and run a CLI to update the `{provider-name}.json` file - `go test ./...` - Run all tests -- `go test -run TestName ./pkg/...` - Run specific test -- `go run main.go` - Start HTTP server on :8080 -- `go run ./cmd/openrouter/main.go` - Generate OpenRouter config ## Code Style Guidelines @@ -23,6 +20,15 @@ - JSON: Use `json.MarshalIndent` for pretty output, validate unmarshaling - File permissions: Use 0o600 for sensitive config files +## Adding more provider commands + +- Create the `./cmd/{provider-name}/main.go` file +- Try to use the provider API to figure out the available models. If there's no + endpoint for listing the models, look for some sort of structured text format + (usually in the docs). If none of that exist, refuse to create the command, + and add it to the `MANUAL_UPDATES.md` file. +- Add it to `.github/workflows/update.yml` + ## Updating providers manually ### Zai @@ -30,3 +36,4 @@ For `zai`, we'll need to grab the model list and capabilities from `https://docs.z.ai/guides/overview/overview`. That page does not contain the exact `context_window` and `default_max_tokens` though. We can grab the exact value from `./internal/providers/configs/openrouter.json`. +