probo icon indicating copy to clipboard operation
probo copied to clipboard

Configurable base URL for LLM providers (Azure OpenAI, Claude on Microsoft Foundry, gateways)

Open barryjooste opened this issue 1 month ago • 1 comments

Problem

Self-hosted deployments often can't send data to api.openai.com or api.anthropic.com directly. Compliance teams commonly approve only cloud-resident model endpoints, such as the Azure OpenAI v1 API or Claude models hosted on Azure through Microsoft Foundry, or an internal LLM gateway. Both expose the same OpenAI Responses and Anthropic Messages APIs that Probo already uses, at a different base URL.

Today probod has no setting for this. buildLLMProviders (pkg/bootstrap/builder.go) reads only PROBOD_OPENAI_API_KEY and PROBOD_ANTHROPIC_API_KEY, and LLMProviderConfig (pkg/probodconfig/llm_config.go) has only type and api-key. The provider packages already support it: pkg/llm/anthropic and pkg/llm/openai both have a WithBaseURL option, but buildLLMClient (pkg/probod/llm.go) never passes it. Checked against probod/v0.309.1.

The only way to do it now is to rely on the SDKs' own ANTHROPIC_BASE_URL / OPENAI_BASE_URL environment fallback. That works, but Probo doesn't document it and could break it in any upgrade.

Proposal

  • Add an optional base-url to LLMProviderConfig, read from PROBOD_OPENAI_BASE_URL and PROBOD_ANTHROPIC_BASE_URL, and pass it through llmopenai.WithBaseURL / llmanthropic.WithBaseURL in buildLLMClient.
  • Document it in the Helm values (openai.baseUrl, anthropic.baseUrl) and the env reference.

Example targets:

  • Azure OpenAI v1: https://<resource>.openai.azure.com/openai/v1/ (model = deployment name)
  • Claude on Microsoft Foundry: https://<resource>.services.ai.azure.com/anthropic (model = deployment name)

Related: budgeted thinking is rejected by newer Claude models

The third-party vetting agents call agent.WithThinking(budget), which the Anthropic provider sends as thinking: {type: "enabled", budget_tokens: N} (pkg/llm/anthropic/provider.go). Newer Claude models reject that with HTTP 400 ("thinking.type.enabled is not supported for this model. Use thinking.type.adaptive and output_config.effort"). We saw this on a Claude Sonnet 5.5 deployment. Supporting adaptive thinking with an effort level, or making the thinking mode configurable per agent, would keep vetting working on current models. Happy to split this into its own issue if you'd prefer.

We can test a PR against an Azure-hosted Claude deployment if that helps.

barryjooste avatar Oct 29 '26 17:10 barryjooste

Hello, we recently merged and released new environment variables allowing to change Anthropic and OpenAI base URL, see https://github.com/getprobo/probo/pull/2163.

I'll close the issue as already implemented, let us know if we can improve on the implementation we choose.

lukkor avatar Oct 30 '26 20:10 lukkor