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
@@ -149,6 +149,8 @@ OPENAI_MODEL = env("OPENAI_MODEL", "gpt-5-mini")
|
||||
# For reasoning models (gpt-5*, o*): minimal|low|medium|high. Leave empty for other models.
|
||||
OPENAI_REASONING_EFFORT = env("OPENAI_REASONING_EFFORT", "low")
|
||||
OPENAI_TIMEOUT = env_int("OPENAI_TIMEOUT", 90)
|
||||
# Optional: OpenAI-compatible endpoint or proxy (default: api.openai.com)
|
||||
OPENAI_BASE_URL = env("OPENAI_BASE_URL")
|
||||
# 0 = unlimited (default). Counted per call, including failed ones.
|
||||
AI_RATE_LIMIT_PER_USER_PER_DAY = env_int("AI_RATE_LIMIT_PER_USER_PER_DAY", 0)
|
||||
AI_RATE_LIMIT_GLOBAL_PER_DAY = env_int("AI_RATE_LIMIT_GLOBAL_PER_DAY", 0)
|
||||
|
||||
@@ -22,6 +22,7 @@ import ipaddress # noqa: E402
|
||||
OPENAI_API_KEY = ""
|
||||
OPENAI_MODEL = "gpt-5-mini"
|
||||
OPENAI_REASONING_EFFORT = "low"
|
||||
OPENAI_BASE_URL = ""
|
||||
AI_RATE_LIMIT_PER_USER_PER_DAY = 0
|
||||
AI_RATE_LIMIT_GLOBAL_PER_DAY = 0
|
||||
COMMENT_RATE_LIMIT_PER_HOUR = 30
|
||||
|
||||
Reference in New Issue
Block a user