switchroom 0.17.1 → 0.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/switchroom.js +15 -7
- package/dist/host-control/main.js +371 -18
- package/package.json +1 -1
- package/profiles/_base/cron-session.sh.hbs +3 -3
- package/profiles/_base/start.sh.hbs +6 -6
- package/telegram-plugin/dist/gateway/gateway.js +106 -280
- package/telegram-plugin/gateway/gateway.ts +8 -1
|
@@ -17177,7 +17177,14 @@ function buildModelDeps(restartCtx?: ModelDepsRestartContext): ModelMenuDeps & M
|
|
|
17177
17177
|
return {
|
|
17178
17178
|
discover: (a) => discoverModels(a),
|
|
17179
17179
|
discoverSrModels: async () => {
|
|
17180
|
-
|
|
17180
|
+
// /model/info lives on the ROOT proxy (model-mapped surface), NOT the
|
|
17181
|
+
// Anthropic pass-through that ANTHROPIC_BASE_URL now points at
|
|
17182
|
+
// (<root>/anthropic). Prefer SWITCHROOM_LITELLM_BASE (the root emitted
|
|
17183
|
+
// by compose.ts); fall back to stripping a trailing /anthropic off
|
|
17184
|
+
// ANTHROPIC_BASE_URL so an agent booted from a pre-passthrough compose
|
|
17185
|
+
// (base_url == root) still resolves correctly.
|
|
17186
|
+
const base = process.env.SWITCHROOM_LITELLM_BASE
|
|
17187
|
+
?? process.env.ANTHROPIC_BASE_URL?.replace(/\/anthropic\/?$/, '')
|
|
17181
17188
|
const headers = process.env.ANTHROPIC_CUSTOM_HEADERS
|
|
17182
17189
|
if (!base || !headers) return []
|
|
17183
17190
|
const keyMatch = headers.match(/x-litellm-api-key:\s*Bearer\s*(\S+)/)
|