DEV Community

Cover image for Use DeepSeek V4.1 Flash and Kimi K2.7 Code in goose with a custom provider file
CloudGPU
CloudGPU

Posted on

Use DeepSeek V4.1 Flash and Kimi K2.7 Code in goose with a custom provider file

Short answer: copy the JSON below into ~/.config/goose/custom_providers/cloudgpu.json, run export CGW_API_KEY="cgw-sk-your-key", then start goose with --provider cloudgpu --model deepseek-v4.1-flash.

Disclosure: I work on CloudGPU, and the endpoint in this post is ours. We haven't tested goose against this endpoint ourselves; the steps follow goose's docs (Configure Custom Provider). Treat the checks below as things you run, not results we measured.

Note: Tool calling through this endpoint isn't tested by us. goose leans on tool calls for real work, so run the self-checks in Step 5 before you hand it a task that matters.

Why a file and not a built-in provider

goose's CONTRIBUTING.md asks services with an OpenAI-compatible API to publish a goose custom-provider JSON file with their own documentation, so users can drop it into their local custom_providers directory without waiting for a goose release. This post is that documentation for CloudGPU.

What you need

  • goose (CLI or Desktop), installed from its own docs.
  • A CloudGPU API key. Go to API Console and create a key. Copy the cgw-sk-... value — it's shown once. The quick start is on the API docs page.

Step 1: Get the JSON

Copy this into a file named cloudgpu.json:

{
  "name": "cloudgpu",
  "engine": "openai",
  "display_name": "CloudGPU",
  "description": "DeepSeek, Kimi, GLM and MiniMax models through CloudGPU's OpenAI-compatible API.",
  "api_key_env": "CGW_API_KEY",
  "base_url": "https://cloudgpu.app/v1",
  "dynamic_models": false,
  "models": [
    { "name": "deepseek-v4.1-flash" },
    { "name": "deepseek-v4-pro" },
    { "name": "kimi-k2.7-code" },
    { "name": "glm-5.3-flash" },
    { "name": "minimax-m3" }
  ],
  "supports_streaming": true,
  "requires_auth": true,
  "model_doc_link": "https://cloudgpu.app/api/docs",
  "setup_steps": [
    "Sign in at https://cloudgpu.app, then go to API Console: https://cloudgpu.app/api/console",
    "Create a key. Copy the cgw-sk-... value — it's shown once.",
    "Top up your balance via Billing. Model IDs are listed on https://cloudgpu.app/api",
    "Set the CGW_API_KEY environment variable to your key before starting goose"
  ]
}
Enter fullscreen mode Exit fullscreen mode

What the fields do, in goose's terms:

  • name is the provider ID you pass to --provider.
  • engine: "openai" tells goose to speak the OpenAI-compatible chat format.
  • base_url is the CloudGPU endpoint. goose adds chat/completions after the /v1.
  • api_key_env is the name of the environment variable goose reads the key from. There is no key in the file, and there never should be.
  • models is the list goose shows. With dynamic_models: false, goose uses only these five IDs and doesn't fetch a model list from the endpoint.
  • No context_limit is set. It's optional in goose's format, and we don't publish context sizes for these models, so goose uses its own defaults.

Step 2: Put it where goose looks

goose's docs give one folder per OS:

  • macOS/Linux: ~/.config/goose/custom_providers/
  • Windows: %APPDATA%\Block\goose\config\custom_providers\

On macOS or Linux:

mkdir -p ~/.config/goose/custom_providers
cp cloudgpu.json ~/.config/goose/custom_providers/cloudgpu.json
Enter fullscreen mode Exit fullscreen mode

Self-check: goose info prints the configuration file location. custom_providers sits in that same config folder. If CloudGPU doesn't show up in the provider list, restart goose.

Step 3: Set the key

export CGW_API_KEY="cgw-sk-your-key"
Enter fullscreen mode Exit fullscreen mode

Use your own key in place of cgw-sk-your-key, and run goose from that same shell. Two things from goose's config docs worth knowing:

  • goose does not read provider API keys from config.yaml. A key there is ignored.
  • If you'd rather keep the key in goose's keychain, open the provider in goose Desktop and enter the key there.
  • If goose Desktop changes the variable name, use the one shown in the provider's settings (Settings, then the Models tab, then Configure providers, then click CloudGPU in the list).

Self-check, outside goose: this is the request from our API docs. If it fails, fix it before going further.

curl https://cloudgpu.app/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $CGW_API_KEY" \
  -d '{"model":"deepseek-v4.1-flash","messages":[{"role":"user","content":"Say hi in one sentence."}]}'
Enter fullscreen mode Exit fullscreen mode

Step 4: Pick a model

These are the model IDs in the file. Each one is in the model table on our API page:

Model ID Model
deepseek-v4.1-flash DeepSeek V4.1 Flash
deepseek-v4-pro DeepSeek V4 Pro
kimi-k2.7-code Kimi K2.7 Code
glm-5.3-flash GLM 5.3 Flash
minimax-m3 MiniMax M3

IDs are case-sensitive and the dots matter. A wrong ID comes back as 400 model_not_found.

  • goose CLI: pass the provider and model per run, as in goose's CLI docs: goose run --provider cloudgpu --model kimi-k2.7-code -t "...". goose also reads GOOSE_PROVIDER and GOOSE_MODEL from the environment.
  • goose Desktop: goose's docs say custom providers appear in the provider list like any other provider. Open Settings, then the Models tab, then Switch models, choose CloudGPU, and pick a model (or Use custom model to type an ID). Confirm with Select model.

Step 5: Quick test

Start with a plain prompt and no session file:

goose run --no-session --provider cloudgpu --model deepseek-v4.1-flash \
  -t "Reply with one short sentence that names the model you are."
Enter fullscreen mode Exit fullscreen mode

Self-checks (what to look for, not what we saw):

  • You get a reply from the model, not an error. If you see 401 missing_authorization or 401 invalid_api_key, the key isn't reaching goose. Check that CGW_API_KEY is set in the shell that runs goose.
  • 400 model_not_found: compare the --model value with the table above, character for character.
  • cloudgpu isn't recognised as a provider: check the file is at the path from Step 2 and that it parses (python3 -m json.tool ~/.config/goose/custom_providers/cloudgpu.json).

Then try a first coding task in a scratch folder, with goose's developer extension turned on:

mkdir -p ~/goose-cloudgpu-test && cd ~/goose-cloudgpu-test
goose run --no-session --provider cloudgpu --model kimi-k2.7-code --with-builtin developer \
  -t "Create hello.py that prints the numbers 1 to 5, then show me the file."
Enter fullscreen mode Exit fullscreen mode

This one needs tool calls, which we haven't tested through our endpoint. Self-check: hello.py exists in the folder and contains what you asked for. If goose answers in text but no file appears, the model's tool calls didn't make it through. Try another model ID from the table and tell us which one failed.

Where to go next

If something in these steps doesn't match what your goose shows, leave a comment with your goose version and the error text (never the key), and we'll update the post.

Top comments (0)