Commit e1e8dbb
fix(zai): fall back to default baseUrl when template lacks one for catalog models
Static catalog model entries from the plugin manifest do not carry a
per-model baseUrl - it is only set at the provider level. When
ctx.providerConfig is undefined (no user config for zai provider) and
the template model from the registry also lacks baseUrl, the resolved
runtime model ends up without a baseUrl. This causes the
OpenAI-compatible transport to fall back to OpenAI's default API host,
producing confusing 401 errors for what should be Z.ai API calls.
Add ZAI_GLOBAL_BASE_URL as the final fallback so catalog models always
resolve with their expected base URL.
Fixes #94269
Co-Authored-By: Claude <[email protected]>1 parent 0cae5b3 commit e1e8dbb
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
0 commit comments