llama-stack-mirror/tests/unit/providers
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
..
agent fix: remove @pytest.mark.asyncio from test_get_raw_document_text.py (#2840) 2025-07-21 09:14:34 -07:00
agents chore: default to pytest asyncio-mode=auto (#2730) 2025-07-11 13:00:24 -07:00
inference feat(openai): add configurable base_url support with OPENAI_BASE_URL env var (#2919) 2025-07-28 10:16:02 -07:00
nvidia chore(test): migrate unit tests from unittest to pytest nvidia test safety (#2793) 2025-07-24 09:41:07 -07:00
utils fix: Fix unit tests CI and failing tests (#2928) 2025-07-28 10:07:26 -07:00
vector_io chore: Fix chroma unit tests (#2896) 2025-07-25 10:12:14 -04:00
test_configs.py feat(api): don't return a payload on file delete (#1640) 2025-03-25 17:12:36 -07:00