File size: 2,677 Bytes
65ed8c3 1246594 65ed8c3 1246594 65ed8c3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | """
ORBIT β Configuration
Loads all settings from the .env file via python-dotenv.
"""
import os
from dotenv import load_dotenv
load_dotenv()
class Config:
# ββ Flask ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SECRET_KEY = os.environ.get("FLASK_SECRET_KEY", "change-me-in-production")
DEBUG = os.environ.get("FLASK_DEBUG", "false").lower() == "true"
SERVER_NAME = os.environ.get("SERVER_NAME", "127.0.0.1:5000")
PREFERRED_URL_SCHEME = os.environ.get("PREFERRED_URL_SCHEME", "http")
# ββ Database βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
raw_db_url = os.environ.get("DATABASE_URL", "sqlite:///orbit.db")
if raw_db_url.startswith("postgres://"):
raw_db_url = raw_db_url.replace("postgres://", "postgresql://", 1)
SQLALCHEMY_DATABASE_URI = raw_db_url
SQLALCHEMY_TRACK_MODIFICATIONS = False
# ββ Google OAuth βββββββββββββββββββββββββββββββββββββββββββββββββββββ
GOOGLE_CLIENT_ID = os.environ.get("GOOGLE_CLIENT_ID", "")
GOOGLE_CLIENT_SECRET = os.environ.get("GOOGLE_CLIENT_SECRET", "")
# ββ Provider Defaults ββββββββββββββββββββββββββββββββββββββββββββββββ
DEFAULT_PROVIDER = "OpenRouter"
DEFAULT_BASE_URL = "https://openrouter.ai/api/v1/chat/completions"
DEFAULT_MODEL = "baidu/cobuddy:free"
DEFAULT_MODELS_OPENROUTER = [
"baidu/cobuddy:free",
"inclusionai/ring-2.6-1t:free",
"x-ai/grok-4.3",
"mistralai/mistral-medium-3-5",
"~anthropic/claude-haiku-latest",
]
DEFAULT_MODELS_NVIDIA = [
"stepfun-ai/step-3.5-flash",
"bytedance/seed-oss-36b-instruct",
"qwen/qwen3-coder-480b-a35b-instruct",
"mistralai/mistral-large-3-675b-instruct-2512",
"minimaxai/minimax-m2.7",
]
PROVIDER_URLS = {
"OpenRouter": "https://openrouter.ai/api/v1/chat/completions",
"Nvidia NIM": "https://integrate.api.nvidia.com/v1/chat/completions",
"Google Gemini":"https://generativelanguage.googleapis.com/v1beta/models/",
"AgentRouter": "https://agentrouter.org/v1/chat/completions",
"Custom OpenAI":"https://api.openai.com/v1/chat/completions",
}
|