updated tests to work without .env file
This commit is contained in:
+7
-2
@@ -6,12 +6,17 @@ PROJECT_ROOT = Path(__file__).parent.parent
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
anthropic_api_key: str
|
||||
# required in production and has safe defaults for testing
|
||||
anthropic_api_key: str = ""
|
||||
model: str = "claude-sonnet-4-5-20250929"
|
||||
safedir: str = "./workspace"
|
||||
max_tokens: int = 8096
|
||||
use_sandbox: bool = True
|
||||
|
||||
model_config = {"env_file": PROJECT_ROOT / ".env"}
|
||||
model_config = {
|
||||
"env_file": PROJECT_ROOT / ".env" if (PROJECT_ROOT / ".env").exists() else None,
|
||||
"extra": "ignore",
|
||||
}
|
||||
|
||||
|
||||
# create singleton instance, causes validation
|
||||
|
||||
Reference in New Issue
Block a user