Commit 78f1a2d
fix: revert incorrect base_url fallback logic that breaks task execution
PR xorbitsai#138 (cee1e49) introduced a provider compatibility system that
incorrectly overrode user-configured base URLs with default values.
The problematic code used:
base_url=model.base_url or default_base_url_for_provider(...)
This fails when base_url is an empty string ("") because Python's `or`
operator treats empty strings as falsy, causing the fallback to activate
even when the user explicitly configured a base URL.
For OpenAI-compatible providers like DashScope that store base_url=""
in the database, this caused requests to be sent to api.openai.com
instead of their configured endpoints. As a result, task execution
failed to start completely - tasks showed blank responses with no
backend execution activity.
This fix reverts to direct provider string comparison and removes the
fallback logic, trusting the database configuration as-is.
Fixes task execution regression introduced in cee1e49 (PR xorbitsai#138)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent cee1e49 commit 78f1a2d
2 files changed
+14
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | 4 | | |
9 | 5 | | |
10 | 6 | | |
| |||
23 | 19 | | |
24 | 20 | | |
25 | 21 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 22 | + | |
29 | 23 | | |
30 | 24 | | |
31 | 25 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 26 | + | |
45 | 27 | | |
46 | 28 | | |
47 | 29 | | |
| |||
78 | 60 | | |
79 | 61 | | |
80 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
81 | 73 | | |
82 | 74 | | |
83 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 13 | | |
18 | 14 | | |
19 | 15 | | |
| |||
101 | 97 | | |
102 | 98 | | |
103 | 99 | | |
104 | | - | |
105 | 100 | | |
106 | | - | |
| 101 | + | |
107 | 102 | | |
108 | 103 | | |
109 | 104 | | |
110 | 105 | | |
111 | 106 | | |
112 | | - | |
113 | | - | |
| 107 | + | |
114 | 108 | | |
115 | 109 | | |
116 | 110 | | |
| |||
0 commit comments