Skip to content

Commit 16be99a

Browse files
Pouyanpimiyoungc
andauthored
docs(migration): explain the "No default base_url" config-load error (#1881)
Co-authored-by: Miyoung Choi <miyoungc@nvidia.com>
1 parent 49b7ff0 commit 16be99a

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

docs/migration/0.22.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The following table summarizes the migration instructions by engine type.
3131
| `engine: openai`, `nim`, `nvidia_ai_endpoints`, or `ollama` with standard OpenAI-compatible parameters | No action required. |
3232
| `engine: vllm_openai` or another LangChain wrapper for an OpenAI-compatible provider such as DeepSeek, OpenRouter, Together.ai, Fireworks.ai, Groq, or `llama.cpp` | Rewrite the model entry. See [OpenAI-compatible providers](#openai-compatible-providers). |
3333
| `engine: openai` with LangChain-only parameters such as `openai_api_base`, `streaming`, `verbose`, or `model_kwargs` | Rewrite the parameters. See [Mixed-shape configs](#mixed-shape-configs). |
34-
| `engine: anthropic`, `cohere`, `vertexai`, `google_genai`, `huggingface_*`, `trt_llm`, or `self_hosted` | Opt into LangChain. See [Using LangChain](#using-langchain). |
34+
| `engine: anthropic`, `cohere`, `vertexai`, `google_genai`, `huggingface_*`, `trt_llm`, or `self_hosted` | Opt into LangChain, or switch to an OpenAI-compatible endpoint if one exists. Refer to [Unsupported Engine on the Default Framework](#unsupported-engine-on-the-default-framework). |
3535
| `engine: azure` or `azure_openai` | Use LangChain for the Azure-specific helpers, or configure the default framework manually. See [Azure OpenAI](#azure-openai). |
3636
| Custom provider registered in `config.py` | Match the provider class to the active framework. See [Custom providers](#custom-providers). |
3737

@@ -145,6 +145,21 @@ Rename `openai_api_base` to `base_url`.
145145
Remove LangChain runtime flags and provider-prefixed aliases.
146146
Streaming still uses the `stream_async` API.
147147

148+
## Unsupported Engine on the Default Framework
149+
150+
If a v0.21 config uses an engine whose API is not OpenAI-compatible, configuration load fails on v0.22 unless you opt into LangChain.
151+
Engines that are not OpenAI-compatible include `anthropic`, `cohere`, `vertexai`, `google_genai`, `huggingface_*`, `trt_llm`, and `self_hosted`.
152+
153+
```text
154+
ValueError: No default base_url for provider 'cohere'. If your endpoint is OpenAI-compatible, set parameters.base_url. Otherwise, set NEMOGUARDRAILS_LLM_FRAMEWORK=langchain and install the matching langchain-<provider> package (see migration guide).
155+
```
156+
157+
The provider name in the message changes to match your `engine:` value.
158+
Choose one remediation path based on your migration goal:
159+
160+
- Keep the LangChain provider class. Install `langchain` and the matching `langchain-<provider>` package, and then set `NEMOGUARDRAILS_LLM_FRAMEWORK=langchain`. Refer to [Using LangChain](#using-langchain) for the full procedure.
161+
- Switch to an OpenAI-compatible endpoint. If the same model is reachable through an OpenAI-compatible HTTP route, set `engine: openai` plus `parameters.base_url`. This includes self-hosted gateways, proxies, and hosted providers that expose `/v1/chat/completions`. Refer to [OpenAI-Compatible Providers](#openai-compatible-providers).
162+
148163
## Using LangChain
149164

150165
If your engine's API is not OpenAI-compatible, keep using LangChain.

0 commit comments

Comments
 (0)