Commit c5defc7
authored
fix: set dummy OPENAI_API_KEY fallback for custom providers and correct Ollama endpoint (#60)
When using --provider custom without --token, the OpenAI SDK raises an error
because OPENAI_API_KEY is unset even though local servers like Ollama don't
require authentication. Sets a dummy fallback value so the SDK initialises cleanly.
Also corrects the README Ollama example from --endpoint /api/generate to
--endpoint /v1 — Pydantic-AI uses the OpenAI SDK which appends /chat/completions
to the base URL, so the OpenAI-compatible path (/v1) is required, not Ollama's
native generate endpoint.
Fixes #591 parent 55177b9 commit c5defc7
2 files changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
0 commit comments