Commit 76c9560
committed
feat: support ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, and SPACEBOT_MODEL env vars
Add environment variable support for custom Anthropic API endpoints
and authentication tokens, enabling use with API proxies (LiteLLM,
Azure AI Gateway, corporate proxies).
New environment variables:
- ANTHROPIC_BASE_URL: override the Anthropic API endpoint
- ANTHROPIC_AUTH_TOKEN: alternative to ANTHROPIC_API_KEY for proxy auth
- SPACEBOT_MODEL: override all process types with a single model
Also fixes a bug where build_anthropic_request() hardcoded the API URL
instead of using the provider's configured base_url, making custom
base URLs via TOML config ineffective.
Closes #1321 parent 547d700 commit 76c9560
3 files changed
Lines changed: 41 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1803 | 1803 | | |
1804 | 1804 | | |
1805 | 1805 | | |
1806 | | - | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
1807 | 1809 | | |
1808 | 1810 | | |
1809 | 1811 | | |
| |||
1826 | 1828 | | |
1827 | 1829 | | |
1828 | 1830 | | |
| 1831 | + | |
| 1832 | + | |
1829 | 1833 | | |
1830 | 1834 | | |
1831 | 1835 | | |
1832 | 1836 | | |
1833 | | - | |
| 1837 | + | |
1834 | 1838 | | |
1835 | 1839 | | |
1836 | 1840 | | |
| |||
1938 | 1942 | | |
1939 | 1943 | | |
1940 | 1944 | | |
1941 | | - | |
| 1945 | + | |
| 1946 | + | |
1942 | 1947 | | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
1943 | 1955 | | |
1944 | 1956 | | |
1945 | 1957 | | |
| |||
2039 | 2051 | | |
2040 | 2052 | | |
2041 | 2053 | | |
2042 | | - | |
| 2054 | + | |
| 2055 | + | |
2043 | 2056 | | |
2044 | 2057 | | |
2045 | 2058 | | |
| |||
2162 | 2175 | | |
2163 | 2176 | | |
2164 | 2177 | | |
| 2178 | + | |
| 2179 | + | |
2165 | 2180 | | |
2166 | 2181 | | |
2167 | 2182 | | |
2168 | 2183 | | |
2169 | | - | |
| 2184 | + | |
2170 | 2185 | | |
2171 | 2186 | | |
2172 | 2187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
35 | 47 | | |
36 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
37 | 52 | | |
38 | 53 | | |
39 | 54 | | |
40 | 55 | | |
41 | 56 | | |
| 57 | + | |
42 | 58 | | |
43 | 59 | | |
44 | 60 | | |
45 | 61 | | |
46 | 62 | | |
47 | 63 | | |
48 | 64 | | |
49 | | - | |
| 65 | + | |
| 66 | + | |
50 | 67 | | |
51 | 68 | | |
52 | 69 | | |
| |||
80 | 97 | | |
81 | 98 | | |
82 | 99 | | |
83 | | - | |
| 100 | + | |
84 | 101 | | |
85 | 102 | | |
86 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| 355 | + | |
355 | 356 | | |
356 | 357 | | |
357 | 358 | | |
| |||
0 commit comments