How to use an OpenAI-compatible provider (Helicone, Perplexity, LiteLLM) with goose?
I'm using goose (aaif-goose/goose) and want to point it at an OpenAI-compatible endpoint such as Helicone, Perplexity, DeepSeek, or LiteLLM. The built-in openai provider is too tightly coupled to OpenAI, and when I set OPENAI_HOST=https://api.perplexity.ai (opens external site), goose appends v1/chat/completions to the URL, which Perplexity rejects. What is the correct configuration for a generic OpenAI-compatible provider?
Originally asked on GitHub: https://github.com/aaif-goose/goose/issues/885
5 answers
This issue is closed as completed, but the thread does not name the version or commit that added the fix; the usable workaround in the thread is a manual host override.
At the time of the thread (Jan-Feb 2025), goose had no separate "OpenAI-compatible" provider — the existing
crates/goose/src/providers/openai.rsis tied to OpenAI's API. A collaborator suggested setting a host environment variable in~/.zshrcas a stopgap (they wroteGOOST_HOST, which looks like a typo; the variable the user in the thread actually tried wasOPENAI_HOST). Settingexport OPENAI_HOST=https://api.perplexity.aigot one user further, but goose then appendedv1/chat/completionsto the base URL, so Perplexity's/chat/completionsendpoint was never hit and there was no bypass at that moment. The maintainer suggested cloning the repo, temporarily editingcrates/goose/src/providers/openai.rs, and runningjust run-uito test your changes.A community member proposed a new
openai_compatible.rsprovider usingOPENAI_API_BASE,OPENAI_API_KEY, andOPENAI_API_MODEL. A maintainer confirmed that should work as long as the host supports all the OpenAI features goose uses, including tool calls, and said the team would start on it soon if no one from the thread tried it out. Since the issue is marked completed, check your goose version and changelog for anopenai_compatibleprovider before relying on the manual override. General advice: keep your API key in an environment variable rather than a committed config file.Did this work for you?What @willemsFEB tried on GitHub (Partly worked)
A user set
export OPENAI_HOST=https://api.perplexity.aiand got further, but goose then appendedv1/chat/completionsto the URL, which Perplexity does not expect.Source: https://github.com/aaif-goose/goose/issues/885#issuecomment-2623838859 (opens external site)
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
The reporter tried the existing openai provider (
crates/goose/src/providers/openai.rs) with Helicone and found it too tied into OpenAI's API to work.Source: https://github.com/aaif-goose/goose/issues/885 (opens external site)
Did this work for you?What @michaelneale tried on GitHub (Outcome unclear)
A collaborator suggested setting
export GOOST_HOST=...in~/.zshrcuntil the UI supported it; no user in the thread reported testing this exact variable.Source: https://github.com/aaif-goose/goose/issues/885#issuecomment-2621006668 (opens external site)
Did this work for you?What @michaelneale tried on GitHub (Outcome unclear)
A maintainer suggested cloning the repo, temporarily editing
crates/goose/src/providers/openai.rs, and runningjust run-uito test changes.Source: https://github.com/aaif-goose/goose/issues/885#issuecomment-2628608203 (opens external site)
Did this work for you?
Related questions
- Goose + GitHub Copilot: Claude models fail with 'internal server error' during goose configure
- Goose stops on API rate limits (Anthropic/Gemini 429) — built-in throttle or workaround?
- Goose GitHub Copilot provider asks for GITHUB_COPILOT_TOKEN instead of device login — what token?
- Goose + Gemini 400 Bad Request with MCP extensions: 'only enum and date-time are supported for STRING type'
- Goose 1.6.0: "Error: Unsupported operation: streaming not implemented" with Ollama