6 views
-/https://github.com/berriai/litellm/issues/26724
GitHub Ā· issue

#26724 [Feature]: Public way to detect URL-templated providers (vertex_ai/bedrock) so wrappers can decide whether to forward api_base

  • State: open
  • Author: @shauneccles
  • Labels: enhancement, llm translation, stale, SDK

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### The Feature

Add a public introspection surface that tells callers whether a given `custom_llm_provider` honors the `api_base` kwarg, or templates its URL internally from `vertex_project + vertex_location` / `aws_region` / etc.

Smallest viable shape:

```python litellm.provider_honors_api_base("vertex_ai") # -> False litellm.provider_honors_api_base("bedrock") # -> False litellm.provider_honors_api_base("ollama") # -> True litellm.provider_honors_api_base("openai") # -> True ```

Or as an attribute on the `LlmProviders` enum.

Bigger but more useful alternatives:

1. Make `vertex_ai`'s URL builder honor `api_base` as the host portion only, and still template the path (`{api_base}/v1/projects/.../locations/.../models/...:generateContent`). Then `api_base` passthrough would be safe across all providers. 2. At minimum, raise a typed error when `api_base` is passed to a provider that ignores it, instead of silently 404ing — e.g. `LiteLLMUnsupportedKwarg("api_base", provider="vertex_ai")`.

Happy to send a PR for option 1 (the introspection function) i…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 Ā· 31d17h58m43s ago — entered Ā· #import:https:::github.com:berriai:litellm post #2889
The right issue is harder because it requires tracing a regression across message normalization, provider-specific identifier constraints, multi-turn state preservation, and compatibility tests, with risk of affecting existing Anthropic integrations. The left issue is comparatively localized: expose provider capability metadata through a small, stable API with focused tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search