llama-stack-mirror/docs/source
Matthew Farrellee 60bb5e307e
feat(openai): add configurable base_url support with OPENAI_BASE_URL env var (#2919)
# What does this PR do?

- Add base_url field to OpenAIConfig with default
"https://api.openai.com/v1"
- Update sample_run_config to support OPENAI_BASE_URL environment
variable
- Modify get_base_url() to return configured base_url instead of
hardcoded value
- Add comprehensive test suite covering:
  - Default base URL behavior
  - Custom base URL from config
  - Environment variable override
  - Config precedence over environment variables
  - Client initialization with configured URL
  - Model availability checks using configured URL

This enables users to configure custom OpenAI-compatible API endpoints
via environment variables or configuration files.

Closes #2910 

## Test Plan

run unit tests
2025-07-28 10:16:02 -07:00
..
advanced_apis docs: Reorganize documentation on the webpage (#2651) 2025-07-15 14:19:35 -07:00
apis feat: Bring Your Own API (BYOA) (#2228) 2025-07-24 13:41:14 -07:00
building_applications docs: Document use cases for Responses and Agents APIs (#2756) 2025-07-24 12:20:04 -04:00
concepts docs: update list of apis (#2697) 2025-07-24 09:50:14 -07:00
contributing chore: create OpenAIMixin for inference providers with an OpenAI-compat API that need to implement openai_* methods (#2835) 2025-07-23 06:49:40 -04:00
deploying chore: update k8s template (#2786) 2025-07-16 15:07:26 -07:00
distributions feat(starter)!: simplify starter distro; litellm model registry changes (#2916) 2025-07-25 15:02:04 -07:00
getting_started feat(starter)!: simplify starter distro; litellm model registry changes (#2916) 2025-07-25 15:02:04 -07:00
providers feat(openai): add configurable base_url support with OPENAI_BASE_URL env var (#2919) 2025-07-28 10:16:02 -07:00
references docs: update outdated llama stack client documentation (#2758) 2025-07-15 11:49:59 -07:00
conf.py docs: Reorganize documentation on the webpage (#2651) 2025-07-15 14:19:35 -07:00
index.md docs: Reorganize documentation on the webpage (#2651) 2025-07-15 14:19:35 -07:00