You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/migration/0.22.md
+16-1Lines changed: 16 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ The following table summarizes the migration instructions by engine type.
31
31
|`engine: openai`, `nim`, `nvidia_ai_endpoints`, or `ollama` with standard OpenAI-compatible parameters | No action required. |
32
32
|`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). |
33
33
|`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). |
35
35
|`engine: azure` or `azure_openai`| Use LangChain for the Azure-specific helpers, or configure the default framework manually. See [Azure OpenAI](#azure-openai). |
36
36
| Custom provider registered in `config.py`| Match the provider class to the active framework. See [Custom providers](#custom-providers). |
37
37
@@ -145,6 +145,21 @@ Rename `openai_api_base` to `base_url`.
145
145
Remove LangChain runtime flags and provider-prefixed aliases.
146
146
Streaming still uses the `stream_async` API.
147
147
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
+
148
163
## Using LangChain
149
164
150
165
If your engine's API is not OpenAI-compatible, keep using LangChain.
0 commit comments