Commit 85c620a
fix: revert incorrect base_url fallback logic that breaks task execution (#141)
* fix: revert incorrect base_url fallback logic that breaks task execution
PR #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 #138)
* fix: add coding plan providers
---------
Co-authored-by: tanbro <tanbro@163.com>1 parent cee1e49 commit 85c620a
2 files changed
+36
-21
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 | | - | |
| 26 | + | |
34 | 27 | | |
35 | 28 | | |
36 | 29 | | |
37 | 30 | | |
38 | 31 | | |
39 | | - | |
40 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
41 | 39 | | |
42 | 40 | | |
43 | | - | |
44 | | - | |
| 41 | + | |
45 | 42 | | |
46 | 43 | | |
47 | 44 | | |
| |||
78 | 75 | | |
79 | 76 | | |
80 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
81 | 88 | | |
82 | 89 | | |
83 | 90 | | |
| |||
| 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 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
114 | 122 | | |
115 | 123 | | |
116 | 124 | | |
| |||
0 commit comments