Skip to content
Merged
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: 4 additions & 4 deletions agent/auxiliary_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def _get_aux_model_for_provider(provider_id: str) -> str:
# plus providers we intentionally keep pinned here (e.g. Anthropic predates
# profiles). New providers should set default_aux_model on their profile instead.
_API_KEY_PROVIDER_AUX_MODELS_FALLBACK: Dict[str, str] = {
"gemini": "gemini-3-flash-preview",
"gemini": "gemini-3.6-flash",
"zai": "glm-4.5-flash",
"kimi-coding": "kimi-k2-turbo-preview",
"stepfun": "step-3.5-flash",
Expand All @@ -545,7 +545,7 @@ def _get_aux_model_for_provider(provider_id: str) -> str:
"anthropic": "claude-haiku-4-5-20251001",
"opencode-zen": "gemini-3-flash",
"opencode-go": "glm-5",
"kilocode": "google/gemini-3-flash-preview",
"kilocode": "google/gemini-3.6-flash",
"ollama-cloud": "nemotron-3-nano:30b",
"tencent-tokenhub": "hy3-preview",
# NB: no "deepinfra" entry — its aux model lives on the ProviderProfile
Expand Down Expand Up @@ -760,8 +760,8 @@ def _nous_extra_body() -> dict:
auxiliary_is_nous: bool = False

# Default auxiliary models per provider
_OPENROUTER_MODEL = "google/gemini-3-flash-preview"
_NOUS_MODEL = "google/gemini-3-flash-preview"
_OPENROUTER_MODEL = "google/gemini-3.6-flash"
_NOUS_MODEL = "google/gemini-3.6-flash"
_NOUS_DEFAULT_BASE_URL = "https://inference-api.nousresearch.com/v1"
_ANTHROPIC_DEFAULT_BASE_URL = "https://api.anthropic.com"
_AUTH_JSON_PATH = get_hermes_home() / "auth.json"
Expand Down
8 changes: 4 additions & 4 deletions agent/gemini_native_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def probe_gemini_tier(
api_key: str,
base_url: str = DEFAULT_GEMINI_BASE_URL,
*,
model: str = "gemini-2.5-flash",
model: str = "gemini-3.6-flash",
timeout: float = 10.0,
) -> str:
"""Probe a Google AI Studio API key and return its tier.
Expand Down Expand Up @@ -154,8 +154,8 @@ def is_free_tier_quota_error(error_message: str) -> bool:


_FREE_TIER_GUIDANCE = (
"\n\nYour Google API key is on the free tier (<= 250 requests/day for "
"gemini-2.5-flash). Hermes typically makes 3-10 API calls per user turn, "
"\n\nYour Google API key is on the free tier (a few hundred requests/day "
"for Gemini Flash models). Hermes typically makes 3-10 API calls per user turn, "
"so the free tier is exhausted in a handful of messages and cannot sustain "
"an agent session. Enable billing on your Google Cloud project and "
"regenerate the key in a billing-enabled project: "
Expand Down Expand Up @@ -976,7 +976,7 @@ def _advance_stream_iterator(iterator: Iterator[_GeminiStreamChunk]) -> tuple[bo
def _create_chat_completion(
self,
*,
model: str = "gemini-2.5-flash",
model: str = "gemini-3.6-flash",
messages: Optional[List[Dict[str, Any]]] = None,
stream: bool = False,
tools: Any = None,
Expand Down
2 changes: 1 addition & 1 deletion hermes_cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def _supports_same_provider_pool_setup(provider: str) -> bool:
],
"gemini": [
"gemini-3.1-pro-preview", "gemini-3-pro-preview",
"gemini-3-flash-preview", "gemini-3.1-flash-lite-preview",
"gemini-3.6-flash", "gemini-3.1-flash-lite-preview",
],
"vertex": [
"google/gemini-3.1-pro-preview", "google/gemini-3-pro-preview",
Expand Down
2 changes: 1 addition & 1 deletion plugins/memory/hindsight/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
_PROVIDER_DEFAULT_MODELS = {
"openai": "gpt-4o-mini",
"anthropic": "claude-haiku-4-5",
"gemini": "gemini-2.5-flash",
"gemini": "gemini-3.6-flash",
"groq": "openai/gpt-oss-120b",
"openrouter": "qwen/qwen3.5-9b",
"minimax": "MiniMax-M2.7",
Expand Down
2 changes: 1 addition & 1 deletion plugins/model-providers/kilocode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
aliases=("kilo-code", "kilo", "kilo-gateway"),
env_vars=("KILOCODE_API_KEY",),
base_url="https://api.kilo.ai/api/gateway",
default_aux_model="google/gemini-3-flash-preview",
default_aux_model="google/gemini-3.6-flash",
)

register_provider(kilocode)
2 changes: 1 addition & 1 deletion plugins/model-providers/openrouter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def build_api_kwargs_extras(
"anthropic/claude-sonnet-4.6",
"openai/gpt-5.4",
"deepseek/deepseek-chat",
"google/gemini-3-flash-preview",
"google/gemini-3.6-flash",
"qwen/qwen3-plus",
),
)
Expand Down
2 changes: 1 addition & 1 deletion plugins/model-providers/vertex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def fetch_models(
env_vars=(), # OAuth2 via service account / ADC — not a static key env var
base_url="https://aiplatform.googleapis.com", # real base_url computed at runtime
auth_type="vertex",
default_aux_model="google/gemini-3-flash-preview",
default_aux_model="google/gemini-3.6-flash",
)

register_provider(vertex)
15 changes: 8 additions & 7 deletions tests/agent/test_auxiliary_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import pytest

from agent.auxiliary_client import (
_NOUS_MODEL,
get_text_auxiliary_client,
get_available_vision_backends,
resolve_vision_provider_client,
Expand Down Expand Up @@ -1804,7 +1805,7 @@ def select(self):
client, model = _try_nous()

assert client is not None
assert model == "google/gemini-3-flash-preview"
assert model == _NOUS_MODEL
assert mock_openai.call_args.kwargs["api_key"] == pooled_token
assert mock_openai.call_args.kwargs["base_url"] == "https://inference.pool.example/v1"

Expand Down Expand Up @@ -1851,7 +1852,7 @@ def try_refresh_current(self):

assert pool.refreshed is True
assert client is not None
assert model == "google/gemini-3-flash-preview"
assert model == _NOUS_MODEL
assert mock_openai.call_args.kwargs["api_key"] == fresh_token
assert mock_openai.call_args.kwargs["base_url"] == "https://inference.pool.example/v1"

Expand Down Expand Up @@ -1938,7 +1939,7 @@ def test_try_nous_falls_back_when_recommendation_lookup_raises(self):
client, model = _try_nous()

assert client is not None
assert model == "google/gemini-3-flash-preview"
assert model == _NOUS_MODEL

def test_call_llm_retries_nous_after_401(self):
class _Auth401(Exception):
Expand Down Expand Up @@ -2360,7 +2361,7 @@ def test_falls_back_to_default_when_portal_matches_stale(self, monkeypatch):
)
out = _refresh_nous_recommended_model(
vision=True, stale_model="openai/gpt-5.4-mini")
assert out == "google/gemini-3-flash-preview"
assert out == _NOUS_MODEL

def test_falls_back_to_default_when_portal_unavailable(self, monkeypatch):
def _boom(**kw):
Expand All @@ -2369,17 +2370,17 @@ def _boom(**kw):
"hermes_cli.models.get_nous_recommended_aux_model", _boom)
out = _refresh_nous_recommended_model(
vision=False, stale_model="some/dead-model")
assert out == "google/gemini-3-flash-preview"
assert out == _NOUS_MODEL

def test_returns_none_when_no_distinct_alternative(self, monkeypatch):
"""When the failed model IS the default and the Portal has nothing
else, there's no usable alternative."""
monkeypatch.setattr(
"hermes_cli.models.get_nous_recommended_aux_model",
lambda **kw: "google/gemini-3-flash-preview",
lambda **kw: _NOUS_MODEL,
)
out = _refresh_nous_recommended_model(
vision=False, stale_model="google/gemini-3-flash-preview")
vision=False, stale_model=_NOUS_MODEL)
assert out is None


Expand Down
8 changes: 4 additions & 4 deletions tests/run_agent/test_provider_parity.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,15 +1022,15 @@ class TestAuxiliaryClientProviderPriority:

def test_openrouter_always_wins(self, monkeypatch):
monkeypatch.setenv("OPENROUTER_API_KEY", "or-key")
from agent.auxiliary_client import get_text_auxiliary_client
from agent.auxiliary_client import _OPENROUTER_MODEL, get_text_auxiliary_client
with patch("agent.auxiliary_client.OpenAI") as mock:
client, model = get_text_auxiliary_client()
assert model == "google/gemini-3-flash-preview"
assert model == _OPENROUTER_MODEL
assert "openrouter" in str(mock.call_args.kwargs["base_url"]).lower()

def test_nous_when_no_openrouter(self, monkeypatch):
monkeypatch.delenv("OPENROUTER_API_KEY", raising=False)
from agent.auxiliary_client import get_text_auxiliary_client
from agent.auxiliary_client import _NOUS_MODEL, get_text_auxiliary_client
nous_auth = {
"access_token": _fake_invoke_jwt(),
"scope": "inference:invoke",
Expand All @@ -1039,7 +1039,7 @@ def test_nous_when_no_openrouter(self, monkeypatch):
patch("agent.auxiliary_client.OpenAI") as mock, \
patch("hermes_cli.models.get_nous_recommended_aux_model", return_value=None):
client, model = get_text_auxiliary_client()
assert model == "google/gemini-3-flash-preview"
assert model == _NOUS_MODEL

def test_custom_endpoint_when_no_nous(self, monkeypatch):
"""Custom endpoint is used when no OpenRouter/Nous keys are available.
Expand Down
Loading