Initial commit: a0_software_orchestrator v1.0
- Auto-Registration-Bug behoben (register_project/get_project_id/resolve_project Trennung) - 25 Tests gruen (Pytest) - block_compactor-Tool refactored (Option B: Soft-Check statt Hard-Block) - 4 Restbaustellen gefixt - DB-Schema: plugin_settings-Tabelle hinzugefuegt - 3 Schattenprojekte aus DB geloescht - Plan v3 + Refactor-Plan + Worklog dokumentiert
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
"""API: Read current model routing configuration."""
|
||||
from helpers.api import ApiHandler, Request, Response
|
||||
import os
|
||||
from usr.plugins.a0_software_orchestrator.helpers.model_routing import load_config, list_roles, get_role_preset
|
||||
|
||||
class ModelRoutingGet(ApiHandler):
|
||||
async def process(self, input: dict, request: Request) -> dict | Response:
|
||||
plugin_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
config = load_config(plugin_dir)
|
||||
roles = list_roles(config)
|
||||
result = {"roles": {}}
|
||||
for role in roles:
|
||||
preset = get_role_preset(role, config)
|
||||
result["roles"][role] = {"preset": preset}
|
||||
result["mode"] = config.get("mode", "per_agent_profile")
|
||||
result["fallback"] = config.get("fallback_to_current_agent_model", True)
|
||||
return result
|
||||
Reference in New Issue
Block a user