This commit is contained in:
+18
-2
@@ -17,9 +17,14 @@ CONFIG_FIELDS: dict[str, dict[str, Any]] = {
|
||||
"ollama_num_ctx": {"env": "OLLAMA_NUM_CTX", "type": "integer", "secret": False},
|
||||
"openai_base_url": {"env": "OPENAI_BASE_URL", "type": "string", "secret": False},
|
||||
"openai_model": {"env": "OPENAI_MODEL", "type": "string", "secret": False},
|
||||
"model_reasoning_effort": {"env": "MODEL_REASONING_EFFORT", "type": "string", "secret": False},
|
||||
"codex_command": {"env": "CODEX_COMMAND", "type": "string", "secret": False},
|
||||
"codex_model": {"env": "CODEX_MODEL", "type": "string", "secret": False},
|
||||
"uex_base_url": {"env": "UEX_BASE_URL", "type": "string", "secret": False},
|
||||
"scmdb_base_url": {"env": "SCMDB_BASE_URL", "type": "string", "secret": False},
|
||||
"cornerstone_base_url": {"env": "CORNERSTONE_BASE_URL", "type": "string", "secret": False},
|
||||
"scwiki_base_url": {"env": "SCWIKI_BASE_URL", "type": "string", "secret": False},
|
||||
"scwiki_api_base_url": {"env": "SCWIKI_API_BASE_URL", "type": "string", "secret": False},
|
||||
"openai_api_key": {"env": "OPENAI_API_KEY", "type": "string", "secret": True},
|
||||
"uex_secret_key": {"env": "UEX_SECRET_KEY", "type": "string", "secret": True},
|
||||
"uex_bearer_token": {"env": "UEX_BEARER_TOKEN", "type": "string", "secret": True},
|
||||
@@ -71,10 +76,15 @@ class Settings(BaseSettings):
|
||||
ollama_model: str = "qwen3.5:9b"
|
||||
ollama_num_ctx: int = 64512
|
||||
openai_base_url: str = "https://api.openai.com/v1"
|
||||
openai_model: str = "gpt-5.3-codex"
|
||||
openai_model: str = "gpt-5.4-mini"
|
||||
model_reasoning_effort: str = "medium"
|
||||
codex_command: str = "codex"
|
||||
codex_model: str = "gpt-5.4"
|
||||
uex_base_url: str = "https://api.uexcorp.space/2.0"
|
||||
scmdb_base_url: str = "https://scmdb.net"
|
||||
cornerstone_base_url: str = "https://finder.cstone.space"
|
||||
scwiki_base_url: str = "https://starcitizen.tools"
|
||||
scwiki_api_base_url: str = "https://api.star-citizen.wiki"
|
||||
openai_api_key: str | None = Field(default=None)
|
||||
uex_secret_key: str | None = Field(default=None)
|
||||
uex_bearer_token: str | None = Field(default=None)
|
||||
@@ -92,7 +102,13 @@ class Settings(BaseSettings):
|
||||
@classmethod
|
||||
def _normalize_model_provider(cls, value: Any) -> str:
|
||||
text = str(value or "ollama").strip().casefold()
|
||||
return text if text in {"ollama", "openai"} else "ollama"
|
||||
return text if text in {"ollama", "openai", "codex"} else "ollama"
|
||||
|
||||
@field_validator("model_reasoning_effort", mode="before")
|
||||
@classmethod
|
||||
def _normalize_reasoning_effort(cls, value: Any) -> str:
|
||||
text = str(value or "medium").strip().casefold()
|
||||
return text if text in {"none", "minimal", "low", "medium", "high", "xhigh"} else "medium"
|
||||
|
||||
@field_validator("traderai_memory_path", mode="before")
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user