# ============================================================================= # .pyfun — PyFundaments App Configuration # Single source of truth for app/* modules (provider, models, tools, hub) # Part of: Universal MCP Hub on PyFundaments # ============================================================================= # RULES: # - All values in double quotes "value" # - NO secrets here! Keys stay in .env → only ENV-VAR NAMES referenced here # - Comment-out unused sections with # → keep structure, parsers need it! # - DO NOT DELETE headers or [X_END] → parsers rely on these markers # - Empty/unused values: "" → never leave bare = # ============================================================================= # TIERS: # LAZY: fill [HUB] + one [LLM_PROVIDER.*] only → works # NORMAL: + [SEARCH_PROVIDER.*] + [MODELS.*] → works better # PRODUCTIVE: + [TOOLS] + [FALLBACK] + [HUB_LIMITS] → full power # ============================================================================= # DO NOT DELETE — file identifier used by all parsers [PYFUN_FILE = .pyfun] # ============================================================================= # HUB — Core identity & transport config # ============================================================================= [HUB] HUB_NAME = "Multi-LLM-API-Gateway" HUB_VERSION = "1.2.0" HUB_DESCRIPTION = "Universal Hub built on PyFundaments" # Transport: sse (legacy/HF Spaces fallback) | streamable-http (MCP spec 2025-11-25) HUB_TRANSPORT = "streamable-http" # Stateless: true = HF Spaces + horizontal scaling safe # false = nur wenn du Server-initiated Notifications brauchst HUB_STATELESS = "true" HUB_HOST = "0.0.0.0" HUB_PORT = "7860" HUB_MODE = "mcp" HUB_SPACE_URL = "" # Optional Token-Schutz für /api, /crypto und /mcp (siehe app/auth.py). # Hier steht nur der NAME der ENV-Variable — der Token selbst kommt in .env / Space-Secret. # Variable nicht gesetzt = Schutz AUS (Hub verhält sich wie bisher). # Client sendet: X-Hub-Token: oder Authorization: Bearer HUB_AUTH_ENV = "HUB_API_TOKEN" [HUB_END] # ============================================================================= # HUB_LIMITS — Request & retry behavior # ============================================================================= [HUB_LIMITS] MAX_PARALLEL_REQUESTS = "5" # gleichzeitige Provider-Calls (Semaphore) RETRY_COUNT = "3" # Versuche pro Provider (inkl. erstem) bei 429/5xx/Verbindungsfehler RETRY_DELAY_SEC = "2" # Pause zwischen den Versuchen; Timeouts werden NICHT wiederholt REQUEST_TIMEOUT_SEC = "60" SEARCH_TIMEOUT_SEC = "30" MAX_TOKENS_CAP = "8192" # harte Obergrenze für max_tokens pro Call (0 = aus) [HUB_LIMITS_END] # ============================================================================= # PROVIDERS — All external API providers # Secrets stay in .env! Only ENV-VAR NAMES are referenced here. # ============================================================================= [PROVIDERS] # ── LLM Providers ───────────────────────────────────────────────────────────── [LLM_PROVIDERS] # ─────────────────────────────────────────────────────────────────────────── # type = welcher Handler den Provider spricht: # "openai_compat" → generisch (/chat/completions) — KEIN Code nötig, nur dieser Block # "anthropic" | "gemini" → eigene Klassen in providers.py # Nur für openai_compat (alles optional): # auth_header = "Authorization" (Default) | auth_scheme = "Bearer" (Default, "" = Key pur) # chat_path = "/chat/completions" (Default) # header. = "..." Extra-Header. Platzhalter: {key} = API-Key, # {env:NAME|fallback} = Wert aus ENV (mit Fallback) # Modelle gehören NICHT hierher, sondern nach [MODELS] (Name = echte API-ID). # ─────────────────────────────────────────────────────────────────────────── # customs LLM [LLM_PROVIDER.smollm] active = "true" type = "openai_compat" base_url = "https://codey-lab-smollm2-customs.hf.space/v1" env_key = "SMOLLM_API_KEY" header.X-IP-Token = "{key}" default_model = "smollm2-360m" fallback_to = "gemini" [LLM_PROVIDER.smollm_END] # AI Wrapper [LLM_PROVIDER.anthropic] active = "true" type = "anthropic" base_url = "https://api.anthropic.com/v1" env_key = "ANTHROPIC_API_KEY" api_version_header = "2023-06-01" default_model = "claude-haiku-5-5" supports_cache = "true" fallback_to = "gemini" [LLM_PROVIDER.anthropic_END] [LLM_PROVIDER.gemini] active = "true" type = "gemini" base_url = "https://generativelanguage.googleapis.com/v1beta" env_key = "GEMINI_API_KEY" default_model = "gemini-2.5-flash" supports_cache = "true" fallback_to = "openrouter" [LLM_PROVIDER.gemini_END] [LLM_PROVIDER.openrouter] active = "true" type = "openai_compat" base_url = "https://openrouter.ai/api/v1" env_key = "OPENROUTER_API_KEY" # → .env: OPENROUTER_API_KEY=sk-or-... header.HTTP-Referer = "{env:APP_URL|https://huggingface.co}" header.X-Title = "{env:HUB_NAME|Universal MCP Hub}" default_model = "nvidia/nemotron-nano-9b-v2:free" fallback_to = "huggingface" [LLM_PROVIDER.openrouter_END] [LLM_PROVIDER.huggingface] active = "true" type = "openai_compat" # TODO prüfen: HF hat (soweit ich weiß) auf https://router.huggingface.co/v1 umgestellt base_url = "https://api-inference.huggingface.co/v1" env_key = "HF_TOKEN" # → .env: HF_TOKEN=hf_... default_model = "Qwen/Qwen2.5-Coder-32B-Instruct" fallback_to = "smollm" # ← last in chain, no further fallback [LLM_PROVIDER.huggingface_END] # ── Neuer OpenAI-kompatibler Provider = NUR so ein Block + Key in .env ───── # (Beispiele zum Einkommentieren — kein Python nötig. Passende Modelle in [MODELS] eintragen!) # [LLM_PROVIDER.mistral] # active = "true" # type = "openai_compat" # base_url = "https://api.mistral.ai/v1" # env_key = "MISTRAL_API_KEY" # default_model = "mistral-small-latest" # fallback_to = "" # [LLM_PROVIDER.mistral_END] # [LLM_PROVIDER.openai] # active = "true" # type = "openai_compat" # base_url = "https://api.openai.com/v1" # env_key = "OPENAI_API_KEY" # default_model = "gpt-4o-mini" # fallback_to = "" # [LLM_PROVIDER.openai_END] # [LLM_PROVIDER.xai] # active = "true" # type = "openai_compat" # base_url = "https://api.x.ai/v1" # env_key = "XAI_API_KEY" # default_model = "grok-4" # fallback_to = "" # [LLM_PROVIDER.xai_END] [LLM_PROVIDERS_END] # ── Search Providers ─────────────────────────────────────────────────────────── [SEARCH_PROVIDERS] [SEARCH_PROVIDER.brave] active = "true" base_url = "https://api.search.brave.com/res/v1/web/search" env_key = "BRAVE_API_KEY" # → .env: BRAVE_API_KEY=BSA... default_results = "5" max_results = "20" fallback_to = "tavily" [SEARCH_PROVIDER.brave_END] [SEARCH_PROVIDER.tavily] active = "true" base_url = "https://api.tavily.com/search" env_key = "TAVILY_API_KEY" # → .env: TAVILY_API_KEY=tvly-... default_results = "5" max_results = "10" include_answer = "true" # AI-synthesized answer fallback_to = "" [SEARCH_PROVIDER.tavily_END] # Keyless Notfall-Fallback (liest die öffentliche HTML-Seite — es gibt KEINE offizielle DDG-API, # daher fragil + bewusst "sanft": globaler Cooldown, kein Retry, ehrlicher User-Agent). # Aktivieren: active = "true" UND bei tavily fallback_to = "duckduckgo" # (ungetestet gegen das echte DuckDuckGo — erst ausprobieren!) [SEARCH_PROVIDER.duckduckgo] active = "false" requires_key = "false" # kein API-Key nötig base_url = "https://html.duckduckgo.com/html/" min_interval_sec = "300" # mind. 5 Min zwischen zwei Anfragen default_results = "5" max_results = "10" fallback_to = "" [SEARCH_PROVIDER.duckduckgo_END] # ── Add more search providers below ─────────────────────────────────────── # [SEARCH_PROVIDER.serper] # active = "false" # base_url = "https://google.serper.dev/search" # env_key = "SERPER_API_KEY" # fallback_to = "" # [SEARCH_PROVIDER.serper_END] [SEARCH_PROVIDERS_END] # ── Web / Action Providers (Webhooks, Bots, Social) ─────────────────────────── # [WEB_PROVIDERS] # [WEB_PROVIDER.discord] # active = "false" # base_url = "https://discord.com/api/v10" # env_key = "BOT_TOKEN" # [WEB_PROVIDER.discord_END] # [WEB_PROVIDER.github] # active = "false" # base_url = "https://api.github.com" # env_key = "GITHUB_TOKEN" # [WEB_PROVIDER.github_END] # [WEB_PROVIDERS_END] [PROVIDERS_END] # ============================================================================= # MODELS — Token & rate limits per model # Parser builds: MODELS[provider][model_name] → limits dict # COSTS: cost_*-Zeilen sind seit v1.1 OPTIONAL — [PRICING] füllt sie automatisch # aus OpenRouter + LiteLLM nach (OR markiert nie auf: per-Token = Vendor- # Listenpreis; ~5.5% Gebühr fällt nur beim Kredit-Kauf an, nicht pro Token). # Deine manuellen cost_* gewinnen IMMER als Override — sinnvoll für eigene # Deployments (smollm = 0.0, weil eigener Server) und Sonderkonditionen. # ============================================================================= [MODELS] # ─────────────────────────────────────────────────────────────────────────── # REGELN (damit nichts mehr veraltet): # - Block-Name = ECHTE API-ID so wie der Provider sie erwartet # (OpenRouter: "vendor/name[:free]", HF: "Org/Name", Anthropic/Gemini: wie in der API) # - provider = Pflicht. Hat ein Tool nur ein model (ohne provider), nimmt der Hub # den Provider von hier. # - context_tokens / max_output_tokens / cost_* NICHT pflegen — [PRICING] holt sie # live aus OpenRouter + LiteLLM. Manuelle Werte gewinnen IMMER; nutze sie nur für # das, was nur du weißt (eigener Server, Sonderkonditionen). max_output_tokens # begrenzt zusätzlich die Antwortlänge (Clamp). # - requests_per_min/day = dein Account-Limit, wird nur angezeigt, NICHT erzwungen. # - OpenRouter-Modelle, die es im Live-Katalog nicht mehr gibt, meldet der Hub # beim Pricing-Refresh als "stale_models" (Log + list_active_tools + refresh_pricing). # ─────────────────────────────────────────────────────────────────────────── [MODEL.claude-opus-4-6] provider = "anthropic" requests_per_min = "5" requests_per_day = "300" capabilities = "text, code, analysis, vision" [MODEL.claude-opus-4-6_END] [MODEL.claude-sonnet-4-6] provider = "anthropic" requests_per_min = "50" requests_per_day = "1000" capabilities = "text, code, analysis, vision" [MODEL.claude-sonnet-4-6_END] [MODEL.claude-haiku-4-5-20251001] provider = "anthropic" requests_per_min = "50" requests_per_day = "2000" capabilities = "text, code, fast" [MODEL.claude-haiku-4-5-20251001_END] [MODEL.gemini-3.1-flash-lite-preview] provider = "gemini" requests_per_min = "15" requests_per_day = "1000" capabilities = "text, code, vision, fast, cheap" [MODEL.gemini-3.1-flash-lite-preview_END] [MODEL.gemini-3-flash-preview] provider = "gemini" requests_per_min = "10" requests_per_day = "1000" capabilities = "text, code, vision, audio, frontier" [MODEL.gemini-3-flash-preview_END] [MODEL.gemini-3.1-pro-preview] provider = "gemini" requests_per_min = "5" requests_per_day = "1000" capabilities = "text, code, vision, audio, reasoning, agents" [MODEL.gemini-3.1-pro-preview_END] [MODEL.gemini-2.5-flash] provider = "gemini" requests_per_min = "15" requests_per_day = "1500" capabilities = "text, code, vision, audio" [MODEL.gemini-2.5-flash_END] [MODEL.gemini-2.5-flash-lite] provider = "gemini" requests_per_min = "15" requests_per_day = "1500" capabilities = "text, code, vision, audio" [MODEL.gemini-2.5-flash-lite_END] [MODEL.gemini-2.0-flash] provider = "gemini" requests_per_min = "15" requests_per_day = "1500" capabilities = "text, code, vision, audio" [MODEL.gemini-2.0-flash_END] [MODEL.mistralai/mistral-7b-instruct] provider = "openrouter" capabilities = "text, code, fast, cheap" [MODEL.mistralai/mistral-7b-instruct_END] [MODEL.cognitivecomputations/dolphin-mistral-24b-venice-edition:free] provider = "openrouter" capabilities = "uncensored, text, code, fast, very cheap" [MODEL.cognitivecomputations/dolphin-mistral-24b-venice-edition:free_END] [MODEL.nvidia/nemotron-nano-9b-v2:free] provider = "openrouter" capabilities = "text, code, reasoning, fast, free" [MODEL.nvidia/nemotron-nano-9b-v2:free_END] [MODEL.google/gemma-3-27b-it:free] provider = "openrouter" capabilities = "text, code, vision, multilingual, free" [MODEL.google/gemma-3-27b-it:free_END] [MODEL.openai/gpt-oss-20b:free] provider = "openrouter" capabilities = "text, code, free" [MODEL.openai/gpt-oss-20b:free_END] [MODEL.nousresearch/deephermes-3-llama-3-8b-preview:free] provider = "openrouter" capabilities = "text, code, reasoning, uncensored, free" [MODEL.nousresearch/deephermes-3-llama-3-8b-preview:free_END] [MODEL.mistralai/Mistral-7B-Instruct-v0.3] provider = "huggingface" capabilities = "text, code, fast, cheap" [MODEL.mistralai/Mistral-7B-Instruct-v0.3_END] [MODEL.meta-llama/Llama-3.3-70B-Instruct] provider = "huggingface" capabilities = "text, code, reasoning, multilingual" [MODEL.meta-llama/Llama-3.3-70B-Instruct_END] [MODEL.smollm2-360m] provider = "smollm" context_tokens = "8192" max_output_tokens = "300" requests_per_min = "60" requests_per_day = "10000" cost_input_per_1k = "0.00000" cost_output_per_1k = "0.00000" capabilities = "text, assistant, navigation, free, local" [MODEL.smollm2-360m_END] [MODEL.codey-lab/model.universal-mcp-hub] provider = "smollm" context_tokens = "8192" max_output_tokens = "300" requests_per_min = "60" requests_per_day = "10000" cost_input_per_1k = "0.00000" cost_output_per_1k = "0.00000" capabilities = "text, assistant, navigation, free, custom, finetuned" [MODEL.codey-lab/model.universal-mcp-hub_END] [MODEL.claude-opus-5-5] provider = "anthropic" capabilities = "text, code, analysis, vision" [MODEL.claude-opus-5-5_END] [MODEL.claude-sonnet-5-5] provider = "anthropic" capabilities = "text, code, analysis, vision" [MODEL.claude-sonnet-5-5_END] [MODEL.claude-haiku-5-5] provider = "anthropic" capabilities = "text, code, fast" [MODEL.claude-haiku-5-5_END] [MODEL.meta-llama/llama-3-8b-instruct] provider = "openrouter" capabilities = "text, code, fast" [MODEL.meta-llama/llama-3-8b-instruct_END] [MODEL.Qwen/Qwen2.5-Coder-32B-Instruct] provider = "huggingface" capabilities = "text, code" [MODEL.Qwen/Qwen2.5-Coder-32B-Instruct_END] [MODEL.meta-llama/Llama-3.1-8B-Instruct] provider = "huggingface" capabilities = "text, code, fast" [MODEL.meta-llama/Llama-3.1-8B-Instruct_END] [MODEL.mistralai/Mistral-Nemo-Instruct-2407] provider = "huggingface" capabilities = "text, code, multilingual" [MODEL.mistralai/Mistral-Nemo-Instruct-2407_END] [MODEL.Qwen/Qwen2.5-72B-Instruct] provider = "huggingface" capabilities = "text, code, reasoning, multilingual" [MODEL.Qwen/Qwen2.5-72B-Instruct_END] [MODELS_END] # ============================================================================= # TOOLS — Tool definitions + provider mapping # Tools are registered in mcp.py only if their provider ENV key exists! # ============================================================================= [TOOLS] # Optional pro Tool (llm + search): Antwort-Cache über db_sync. # cache = "true" und cache_ttl_sec = "3600" # Default AUS (LLM-Antworten sind nicht deterministisch). [TOOL.llm_complete] active = "true" description = "Send prompt to any configured LLM provider" provider_type = "llm" default_provider = "anthropic" timeout_sec = "60" system_prompt = "You are a helpful assistant integrated into the Universal MCP Hub. Answer concisely and only what is asked." [TOOL.llm_complete_END] [TOOL.code_review] active = "true" description = "Review code for bugs, security issues and improvements" provider_type = "llm" default_provider = "anthropic" timeout_sec = "60" system_prompt = "You are an expert code reviewer. Analyze the given code for bugs, security issues, and improvements. Be specific and concise." [TOOL.code_review_END] [TOOL.summarize] active = "true" description = "Summarize text into concise bullet points" provider_type = "llm" default_provider = "gemini" timeout_sec = "30" system_prompt = "You are a summarization expert. Summarize the given text in 3-5 bullet points. Be concise and accurate." [TOOL.summarize_END] [TOOL.translate] active = "true" description = "Translate text — auto-detects source language" provider_type = "llm" default_provider = "gemini" timeout_sec = "30" system_prompt = "You are a professional translator. Translate the given text accurately. Auto-detect the source language. Output only the translation, no explanation." [TOOL.translate_END] [TOOL.web_search] active = "true" description = "Search the web via configured search provider" provider_type = "search" default_provider = "brave" timeout_sec = "30" [TOOL.web_search_END] [TOOL.db_query] active = "true" description = "Execute SELECT queries on connected database (read-only)" provider_type = "db" readonly = "true" timeout_sec = "10" [TOOL.db_query_END] [TOOL.persist_result] active = "true" description = "Persist important results to long-term memory (PostgreSQL) — restart-safe queue in SQLite, flushes automatically" provider_type = "persist" state_read_key = "" # welcher hub_state Key → leer = prompt direkt target_table = "hub_results" timeout_sec = "10" # score-Parameter (optional, float) = reservierter Slot fuer den # Bullshit-Filter — wird unverarbeitet durchgereicht und landet als # eigene Spalte in PostgreSQL. Filter/Scoring baust DU, nicht der Hub. [TOOL.persist_result_END] # ── Future tools ────────────────────────────────────────────────────────── # [TOOL.image_gen] # active = "false" # description = "Generate images via configured provider" # provider_type = "image" # default_provider = "" # timeout_sec = "120" # [TOOL.image_gen_END] # [TOOL.code_exec] # active = "false" # description = "Execute sandboxed code snippets" # provider_type = "sandbox" # timeout_sec = "30" # [TOOL.code_exec_END] # ── Shellmaster 2.0 ────────────────────────────────────────────────────────── # SECURITY LEVEL: ROT — dein CLI-Commander. LLM generiert → Hardblock+ # Registry-Check → DEINE Bestätigung → Ausführung auf DEINEM lokalen # Rechner (Agent :5004). NUR lokal — NIEMALS auf öffentlichen HF Spaces # aktivieren! Token gehört in .env (shellmaster_env_key), nicht hierher. [TOOL.shellmaster] active = "false" shellmaster_agent_url = "http://localhost:5004" shellmaster_env_key = "SHELLMASTER_TOKEN" # → .env, wie bei allen Providern shellmaster_token = "" # Fallback nur für lokale Tests description = "AI-powered shell assistant — generates and executes safe shell commands" provider_type = "llm" default_provider = "smollm" timeout_sec = "30" shellmaster_commands_file = "shellmaster_commands.jsonl" shellmaster_commands_dataset = "" shellmaster_customs_model = "" system_prompt = "You are ShellMaster. Generate safe shell commands for the requested task. Output ONLY valid JSON: {\"command\": \"cmd here\", \"backup\": \"backup cmd or empty\", \"recovery\": \"recovery cmd or empty\", \"risk\": \"low|medium|high\"}" [TOOL.shellmaster_END] [TOOL.shellmaster_confirm] active = "false" description = "Confirm and execute the last ShellMaster command — runs backup first" [TOOL.shellmaster_confirm_END] [TOOL.shellmaster_recover] active = "false" description = "Execute recovery plan for last ShellMaster command" [TOOL.shellmaster_recover_END] [TOOL.shellmaster_commands] active = "false" description = "List allowed ShellMaster commands from registry" [TOOL.shellmaster_commands_END] # ── Integrationen (alle inaktiv, bis [DISCORD] / [GSC] unten aktiv sind) ────── [TOOL.discord_post] active = "false" description = "Post a message to Discord (default channel / webhook)" provider_type = "discord" [TOOL.discord_post_END] [TOOL.gsc_query] active = "false" description = "Google Search Console: top queries/pages of a property (read-only)" provider_type = "gsc" [TOOL.gsc_query_END] # ── Skill-Datenbanken (app/db/skills/, gebaut mit local_tools/vector_hub) — nur lesen ─────── [TOOL.show_skills] active = "true" description = "List available skills (name, description, tags) — user + agent skills" provider_type = "skills" skills_action = "catalog" [TOOL.show_skills_END] [TOOL.search_skills] active = "true" description = "Search skills by keywords (BM25) — returns the best matching chunks" provider_type = "skills" skills_action = "search" [TOOL.search_skills_END] # LLM-Tools: Skills automatisch in den System-Prompt (überschreibt die globalen [SKILLS]-Schalter): # use_core = "true" core.db (Regeln/Restriktionen) voranstellen — kostet bei JEDEM Call Tokens # use_skills = "true" passende user-Skill-Chunks (BM25 auf den Prompt) anhängen # ── Skills: System-Prompt aus Markdown-Datei (app/skills/*.md) ──────────────── # An jedem LLM-Tool möglich, zusätzlich zu system_prompt: # system_prompt_file = "mein_skill.md" # Es wird nur TEXT gelesen — aus app/skills/ wird nie Code ausgeführt. [TOOLS_END] # ============================================================================= # DB_SYNC — Internal SQLite config for app/* IPC # This is NOT the cloud DB — that lives in .env → DATABASE_URL # ============================================================================= [DB_SYNC] SQLITE_PATH = "app/.hub_state.db" # internal state, never commit! SYNC_INTERVAL_SEC = "30" # how often to flush to SQLite MAX_CACHE_ENTRIES = "1000" PERSIST_QUEUE_MAX = "500" # restart-safe queue: SQLite → PostgreSQL PERSIST_FLUSH_INTERVAL_SEC = "60" # retry interval for the PG flusher # Neon scale-to-zero: der Hub wartet NIE auf PostgreSQL und crasht nicht (siehe db_sync Section 6b) PG_WRITE_TIMEOUT_SEC = "10" # hartes Limit pro PG-Schreibzugriff PG_BACKOFF_SEC = "30" # nach Verbindungsfehler so lange kein neuer Versuch (Queue bleibt) PG_REQUEST_WAIT_SEC = "3" # so lange wartet persist_result max.; Rest läuft im Hintergrund PG_PING_TIMEOUT_SEC = "5" # health_check: "ist die DB wach?" PG_STATUS_TTL_SEC = "20" # Status-Ping wird so lange gecacht PG_KEEPALIVE_SEC = "0" # 0 = aus. z.B. "240" hält Neon wach — verbraucht Compute-Stunden! [DB_SYNC_END] # ============================================================================= # DISCORD — Integration (app/discord_api.py). Secrets NUR in .env, hier nur ENV-NAMEN. # Aktivieren: DISCORD_ACTIVE = "true" + Tool [TOOL.discord_post] active = "true". # ⚠ Vorher HUB_API_TOKEN setzen — sonst kann jeder, der /api erreicht, über den Bot posten. # /discord (Interactions) braucht eine ÖFFENTLICHE URL (privater HF-Space = für Discord unerreichbar). # ============================================================================= [DISCORD] DISCORD_ACTIVE = "false" DISCORD_ENV_KEY = "DISCORD_BOT_TOKEN" # → .env: Bot-Token DISCORD_WEBHOOK_ENV_KEY = "DISCORD_WEBHOOK_URL" # → .env: Webhook-URL (die URL ist das Secret) DISCORD_APP_ID = "" # Dev Portal → Application ID (öffentlich) DISCORD_APP_PUBLIC_KEY = "" # Dev Portal → Public Key (öffentlich, nur Verify) DISCORD_DEFAULT_CHANNEL = "" # Channel-ID für Posts ohne channel_id DISCORD_ALLOWED_CHANNELS = "" # kommagetrennt — nur diese channel_id darf ein Client wählen DISCORD_ALLOWED_GUILDS = "" # kommagetrennt — leer = /ask auf jedem Server, auf dem der Bot ist DISCORD_TIMEOUT_SEC = "15" [DISCORD_END] # ============================================================================= # SKILLS — Skill-Datenbanken (app/skills_db.py), READ-ONLY. # app/db/skills/core/core.db = Haupt-Skill mit allen Restriktionen (nie über Tools abrufbar) # app/db/skills/core/*.db = Agent-Referenz (z.B. core_agent.db) — durchsuchbar # app/db/skills/user/*.db = deine Skills (autoload) — durchsuchbar # Die DBs baust du lokal mit local_tools/vector_hub/secure_vectorizer.py. # Tools show_skills / search_skills sind oben aktiv; die Injektion in LLM-Prompts ist AUS (kostet Tokens). # ============================================================================= [SKILLS] SKILLS_ACTIVE = "true" SKILLS_CORE_MAX_CHARS = "8000" # Obergrenze für den core-Text im System-Prompt SKILLS_INJECT_CORE = "false" # true = core.db bei ALLEN llm-Tools voranstellen (je Tool: use_core) SKILLS_INJECT_RELEVANT = "false" # true = passende user-Skill-Chunks anhängen (je Tool: use_skills) SKILLS_TOP_K = "3" SKILLS_MAX_CHARS = "3000" [SKILLS_END] # ============================================================================= # GSC — Google Search Console (app/gsc.py), read-only. Optionale Pakete: # pip install google-api-python-client google-auth # Credentials: ENV-Variable GSC_CREDENTIALS = Service-Account-JSON (Text) ODER Dateipfad. # Die Service-Account-Mail muss in der Search Console als Nutzer der Property eingetragen sein. # Aktivieren: GSC_ACTIVE = "true" + Tool [TOOL.gsc_query] active = "true". # ============================================================================= [GSC] GSC_ACTIVE = "false" GSC_ENV_KEY = "GSC_CREDENTIALS" GSC_DEFAULT_PROPERTY = "" # z.B. "sc-domain:example.com" GSC_API_NAME = "searchconsole" # (alt: "webmasters" / "v3") GSC_API_VERSION = "v1" [GSC_END] # ============================================================================= # PRICING — Auto model costs (OpenRouter + LiteLLM) # WHY: not every provider has a pricing API (Anthropic/Google: none). # These two public sources fill cost_input_per_1k / cost_output_per_1k # automatically. Your [MODELS] values ALWAYS win as override. # Cache lives in db_sync hub_state, TTL-gated (default 24h). # ============================================================================= [PRICING] PRICING_ENABLED = "true" PRICING_TTL_HOURS = "24" OPENROUTER_MODELS_URL = "https://openrouter.ai/api/v1/models" LITELLM_PRICES_URL = "https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json" [PRICING_END] # ============================================================================= # DEBUG — app/* debug behavior (fundaments debug stays in .env) # NOTE (v1.1.0): This section is NOT YET WIRED — no app/* code reads it. # Real debug switches live in .env: PYFUNDAMENTS_DEBUG / LOG_LEVEL / # LOG_TO_TMP / ENABLE_PUBLIC_LOGS (see example-mcp___.env). # Defaults below are SAFE (OFF) so wiring this later cannot leak data. # ============================================================================= [DEBUG] DEBUG = "OFF" # ON | OFF (not wired yet) DEBUG_LEVEL = "WARN" # FULL | WARN | ERROR (not wired yet) LOG_FILE = "hub_debug.log" # (not wired yet) LOG_REQUESTS = "false" # (not wired yet) LOG_RESPONSES = "false" # (not wired yet — would log sensitive data!) [DEBUG_END] # ============================================================================= # PARSER_PROVIDER FREE ENDPOINTS — soon # ============================================================================= [PARSER_PROVIDER] #[PARSER_PROVIDER.metaculus] #active = "true" #base_url = "https://www.metaculus.com/api2" #env_key = "" # public API, kein key! #category = "research" #legal_de = "true" # ← Deutschland-Check direkt in config! #[PARSER_PROVIDER.metaculus_END] #[PARSER_PROVIDER.polymarket] #active = "false" #base_url = "https://gamma-api.polymarket.com" #env_key = "" #legal_de = "false" #[PARSER_PROVIDER.polymarket_END] [PARSER_PROVIDER_END]