Add OPENAI_BASE_URL and end-to-end AI tests through the SDK
- Optional OPENAI_BASE_URL for OpenAI-compatible endpoints or proxies - Tests run the real openai SDK against a local stub server: request shape (model, auth, strict json_schema), text cleanup, photo import and an authentication error mapped to the UI message Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
74e11845de
commit
3b72436119
+2
-1
@@ -206,7 +206,8 @@ def _check_limits(user):
|
||||
|
||||
|
||||
def _client():
|
||||
return openai.OpenAI(api_key=settings.OPENAI_API_KEY, timeout=settings.OPENAI_TIMEOUT, max_retries=1)
|
||||
return openai.OpenAI(api_key=settings.OPENAI_API_KEY, timeout=settings.OPENAI_TIMEOUT, max_retries=1,
|
||||
base_url=settings.OPENAI_BASE_URL or None)
|
||||
|
||||
|
||||
def _create_completion(messages):
|
||||
|
||||
Reference in New Issue
Block a user