Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions gauss_cli/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@ class ProviderConfig:
api_key_env_vars=("DEEPSEEK_API_KEY",),
base_url_env_var="DEEPSEEK_BASE_URL",
),
"requesty": ProviderConfig(
id="requesty",
name="Requesty",
auth_type="api_key",
inference_base_url="https://router.requesty.ai/v1",
api_key_env_vars=("REQUESTY_API_KEY",),
base_url_env_var="REQUESTY_BASE_URL",
),
}


Expand Down
17 changes: 17 additions & 0 deletions gauss_cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,14 @@ def ensure_gauss_home():
"category": "provider",
"advanced": True,
},
"REQUESTY_API_KEY": {
"description": "Requesty API key (OpenAI-compatible router across many models)",
"prompt": "Requesty API key",
"url": "https://app.requesty.ai/api-keys",
"password": True,
"category": "provider",
"advanced": True,
},
"GLM_API_KEY": {
"description": "Z.AI / GLM API key (also recognized as ZAI_API_KEY / Z_AI_API_KEY)",
"prompt": "Z.AI / GLM API key",
Expand Down Expand Up @@ -514,6 +522,13 @@ def ensure_gauss_home():
"password": False,
"category": "provider",
},
"REQUESTY_BASE_URL": {
"description": "Custom Requesty API base URL (advanced)",
"prompt": "Requesty Base URL",
"url": "",
"password": False,
"category": "provider",
},

# ── Tool API keys ──
"FIRECRAWL_API_KEY": {
Expand Down Expand Up @@ -1042,6 +1057,7 @@ def load_config() -> Dict[str, Any]:
# kimi-coding (KIMI_API_KEY) — Kimi / Moonshot
# minimax (MINIMAX_API_KEY) — MiniMax
# minimax-cn (MINIMAX_CN_API_KEY) — MiniMax (China)
# requesty (REQUESTY_API_KEY) — Requesty (OpenAI-compatible router)
#
# For custom OpenAI-compatible endpoints, add base_url and api_key_env.
#
Expand Down Expand Up @@ -1072,6 +1088,7 @@ def load_config() -> Dict[str, Any]:
# kimi-coding (KIMI_API_KEY) — Kimi / Moonshot
# minimax (MINIMAX_API_KEY) — MiniMax
# minimax-cn (MINIMAX_CN_API_KEY) — MiniMax (China)
# requesty (REQUESTY_API_KEY) — Requesty (OpenAI-compatible router)
#
# For custom OpenAI-compatible endpoints, add base_url and api_key_env.
#
Expand Down
2 changes: 2 additions & 0 deletions gauss_cli/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"minimax-cn": "MiniMax (China)",
"anthropic": "Anthropic",
"deepseek": "DeepSeek",
"requesty": "Requesty",
"custom": "Custom endpoint",
}

Expand Down Expand Up @@ -143,6 +144,7 @@ def list_available_providers() -> list[dict[str, str]]:
_PROVIDER_ORDER = [
"openrouter", "nous", "openai-codex",
"zai", "kimi-coding", "minimax", "minimax-cn", "anthropic", "deepseek",
"requesty",
]
# Build reverse alias map
aliases_for: dict[str, list[str]] = {}
Expand Down
40 changes: 38 additions & 2 deletions gauss_cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def _set_default_model(config: Dict[str, Any], model_name: str) -> None:
"kimi-coding": ["kimi-k2.5", "kimi-k2-thinking", "kimi-k2-turbo-preview"],
"minimax": ["MiniMax-M2.5", "MiniMax-M2.5-highspeed", "MiniMax-M2.1"],
"minimax-cn": ["MiniMax-M2.5", "MiniMax-M2.5-highspeed", "MiniMax-M2.1"],
"requesty": ["openai/gpt-4o-mini", "openai/gpt-4o", "anthropic/claude-sonnet-4-5", "google/gemini-2.5-flash", "deepseek/deepseek-chat"],
}


Expand Down Expand Up @@ -723,6 +724,7 @@ def setup_model_provider(config: dict):
"MiniMax (global endpoint)",
"MiniMax China (mainland China endpoint)",
"Anthropic (Claude models — API key or Claude Code subscription)",
"Requesty (OpenAI-compatible router across many models)",
]
if keep_label:
provider_choices.append(keep_label)
Expand Down Expand Up @@ -1231,7 +1233,40 @@ def setup_model_provider(config: dict):
_set_model_provider(config, "anthropic")
selected_base_url = ""

# else: provider_idx == 9 (Keep current) — only shown when a provider already exists
elif provider_idx == 9: # Requesty
selected_provider = "requesty"
print()
print_header("Requesty API Key")
pconfig = PROVIDER_REGISTRY["requesty"]
print_info(f"Provider: {pconfig.name}")
print_info(f"Base URL: {pconfig.inference_base_url}")
print_info("Get your API key at: https://app.requesty.ai/api-keys")
print()

existing_key = get_env_value("REQUESTY_API_KEY")
if existing_key:
print_info(f"Current: {existing_key[:8]}... (configured)")
if prompt_yes_no("Update API key?", False):
api_key = prompt(" Requesty API key", password=True)
if api_key:
save_env_value("REQUESTY_API_KEY", api_key)
print_success("Requesty API key updated")
else:
api_key = prompt(" Requesty API key", password=True)
if api_key:
save_env_value("REQUESTY_API_KEY", api_key)
print_success("Requesty API key saved")
else:
print_warning("Skipped - agent won't work without an API key")

# Clear custom endpoint vars if switching
if existing_custom:
save_env_value("OPENAI_BASE_URL", "")
save_env_value("OPENAI_API_KEY", "")
_set_model_provider(config, "requesty", pconfig.inference_base_url)
selected_base_url = pconfig.inference_base_url

# else: provider_idx == 10 (Keep current) — only shown when a provider already exists
# Normalize "keep current" to an explicit provider so downstream logic
# doesn't fall back to the generic OpenRouter/static-model path.
if selected_provider is None:
Expand Down Expand Up @@ -1268,6 +1303,7 @@ def setup_model_provider(config: dict):
"minimax": "MiniMax",
"minimax-cn": "MiniMax CN",
"anthropic": "Anthropic",
"requesty": "Requesty",
"custom": "your custom endpoint",
}
_prov_display = _prov_names.get(selected_provider, selected_provider or "your provider")
Expand Down Expand Up @@ -1401,7 +1437,7 @@ def setup_model_provider(config: dict):
_set_default_model(config, custom)
_update_config_for_provider("openai-codex", DEFAULT_CODEX_BASE_URL)
_set_model_provider(config, "openai-codex", DEFAULT_CODEX_BASE_URL)
elif selected_provider in ("zai", "kimi-coding", "minimax", "minimax-cn"):
elif selected_provider in ("zai", "kimi-coding", "minimax", "minimax-cn", "requesty"):
_setup_provider_model_selection(
config, selected_provider, current_model,
prompt_choice, prompt,
Expand Down