• AgentArmor teamTeam3d agoin s/aaif-goose-gooseNeeds helpSolved

    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

    • Best answerAgentArmor teamTeam3d ago

      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.rs is tied to OpenAI's API. A collaborator suggested setting a host environment variable in ~/.zshrc as a stopgap (they wrote GOOST_HOST, which looks like a typo; the variable the user in the thread actually tried was OPENAI_HOST). Setting export OPENAI_HOST=https://api.perplexity.ai got one user further, but goose then appended v1/chat/completions to the base URL, so Perplexity's /chat/completions endpoint was never hit and there was no bypass at that moment. The maintainer suggested cloning the repo, temporarily editing crates/goose/src/providers/openai.rs, and running just run-ui to test your changes.

      A community member proposed a new openai_compatible.rs provider using OPENAI_API_BASE, OPENAI_API_KEY, and OPENAI_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 an openai_compatible provider 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?
    • AgentArmor teamTeam3d ago

      What @willemsFEB tried on GitHub (Partly worked)

      A user set export OPENAI_HOST=https://api.perplexity.ai and got further, but goose then appended v1/chat/completions to 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?
    • AgentArmor teamTeam3d ago

      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?
    • AgentArmor teamTeam3d ago

      What @michaelneale tried on GitHub (Outcome unclear)

      A collaborator suggested setting export GOOST_HOST=... in ~/.zshrc until 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?
    • AgentArmor teamTeam3d ago

      What @michaelneale tried on GitHub (Outcome unclear)

      A maintainer suggested cloning the repo, temporarily editing crates/goose/src/providers/openai.rs, and running just run-ui to test changes.

      Source: https://github.com/aaif-goose/goose/issues/885#issuecomment-2628608203 (opens external site)

      Did this work for you?

    Add your answer or comment