feat(app-controller): modularize handlers and enforce 1-space indentation
This commit is contained in:
@@ -523,11 +523,6 @@ def list_models(provider: str) -> list[str]:
|
||||
"""
|
||||
[C: src/app_controller.py:AppController.do_fetch, tests/test_agent_capabilities.py:test_agent_capabilities_listing, tests/test_ai_client_list_models.py:test_list_models_gemini_cli, tests/test_deepseek_infra.py:test_deepseek_model_listing, tests/test_minimax_provider.py:test_minimax_list_models]
|
||||
"""
|
||||
proxy = _get_proxy()
|
||||
if proxy and proxy.status == "ready":
|
||||
result = proxy.send_command("list_models", {"provider": provider})
|
||||
if "result" in result:
|
||||
return result["result"].get("models", [])
|
||||
creds = _load_credentials()
|
||||
if provider == "gemini":
|
||||
return _list_gemini_models(creds["gemini"]["api_key"])
|
||||
|
||||
+971
-837
File diff suppressed because it is too large
Load Diff
@@ -43,11 +43,23 @@ import tomllib
|
||||
import datetime
|
||||
from dataclasses import dataclass, field
|
||||
from typing import List, Optional, Dict, Any, Union
|
||||
from pydantic import BaseModel
|
||||
from pathlib import Path
|
||||
from src.paths import get_config_path
|
||||
|
||||
PROVIDERS: List[str] = ["gemini", "anthropic", "gemini_cli", "deepseek", "minimax"]
|
||||
|
||||
class GenerateRequest(BaseModel):
|
||||
prompt: str
|
||||
auto_add_history: bool = True
|
||||
temperature: float | None = None
|
||||
top_p: float | None = None
|
||||
max_tokens: int | None = None
|
||||
|
||||
class ConfirmRequest(BaseModel):
|
||||
approved: bool
|
||||
script: Optional[str] = None
|
||||
|
||||
CONFIG_PATH = get_config_path()
|
||||
|
||||
def _clean_nones(data: Any) -> Any:
|
||||
|
||||
Reference in New Issue
Block a user