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.
@@ -17177,7 +17177,14 @@ function buildModelDeps(restartCtx?: ModelDepsRestartContext): ModelMenuDeps & M
17177
17177
  return {
17178
17178
  discover: (a) => discoverModels(a),
17179
17179
  discoverSrModels: async () => {
17180
- const base = process.env.ANTHROPIC_BASE_URL
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+)/)