You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer using Azure OpenAI, I want to set endpoint=https://{resource}.openai.azure.com/openai/deployments/{deployment} so I can utilize Azure's OpenAI services
As a DevOps engineer, I need to configure API_BASE_URL=http://local-llm-proxy:8080 to meet corporate security policies
As a researcher, I want to point the API to my local Ollama instance at http://localhost:11434/v1 to test private models
✅ Current approach maintains backward compatibility while enabling flexibility
Request-level endpoint override
❌ Complicates API design
✅ System-wide configuration better aligns with typical deployment scenarios
Additional Context
graph TD
A[Client Code] --> B{API_BASE_URL configured?}
B -->|Yes| C[Use custom endpoint]
B -->|No| D[Use default OpenAI endpoint]
C --> E[Make API call]
D --> E
Loading
(This sequence diagram shows the configuration priority flow)
Problem Statement
Currently, the project hardcodes the OpenAI API endpoint (e.g.
https://api.openai.com/v1), which prevents users from:Proposed Solution
Add a configuration parameter
API_BASE_URLthat:https://api.openai.com/v1for backward compatibilityOPENAI_API_BASEor configuration fileExample configuration:
{ "provider": "openai", "model": "gpt-5-nano", "api_key": "sk-...", "api_base_url": "https://someotheroepnai.com/v1/" }User Stories
endpoint=https://{resource}.openai.azure.com/openai/deployments/{deployment}so I can utilize Azure's OpenAI servicesAPI_BASE_URL=http://local-llm-proxy:8080to meet corporate security policieshttp://localhost:11434/v1to test private modelsAcceptance Criteria
Alternatives Considered
Adding separate providers for each service
Request-level endpoint override
Additional Context
graph TD A[Client Code] --> B{API_BASE_URL configured?} B -->|Yes| C[Use custom endpoint] B -->|No| D[Use default OpenAI endpoint] C --> E[Make API call] D --> E(This sequence diagram shows the configuration priority flow)