odysseus-dev/odysseus · error · HTTPException
Cannot reach /v1/models
Error message
Cannot reach /v1/models
What it means
Error "Cannot reach /v1/models" thrown in odysseus-dev/odysseus.
Source
Thrown at routes/session_routes.py:394
validation_headers = build_headers(effective_api_key, endpoint_base_url or endpoint_url)
if skip_val:
# skip_validation = trust the caller and do NOT probe /v1/models.
# Used for custom endpoints AND for bare placeholder sessions with no
# model at all (e.g. an email reply draft just needs a session to live
# in). Probing here was 400-ing those with "Cannot reach /v1/models".
pass
elif not model_to_use:
from src.llm_core import list_model_ids
ids = list_model_ids(
endpoint_url,
timeout=SESSION_MODEL_VALIDATION_TIMEOUT,
headers=validation_headers,
owner=user,
endpoint_id=endpoint_id.strip() if endpoint_id else None,
)
if not ids:
raise HTTPException(400, "Cannot reach /v1/models")
# Default to the first CHAT model — endpoints often list embedding/
# tts/whisper models first (e.g. text-embedding-ada-002), which
# can't hold a conversation.
_NON_CHAT = ("text-embedding", "embedding", "tts-", "whisper",
"text-moderation", "moderation-", "dall-e", "rerank")
chat_ids = [m for m in ids if not any(p in m.lower() for p in _NON_CHAT)]
model_to_use = (chat_ids or ids)[0]
else:
from src.llm_core import list_model_ids
import os as _os
req_base = _os.path.basename(model_to_use.rstrip("/"))
avail = list_model_ids(
endpoint_url,
timeout=SESSION_MODEL_VALIDATION_TIMEOUT,
headers=validation_headers,
owner=user,
endpoint_id=endpoint_id.strip() if endpoint_id else None,
)View on GitHub (pinned to f9235ebbf1)
Solutions
- Verify the endpoint server is running and /v1/models is reachable.
- Check the base URL and network path, then retry.
When it happens
Trigger: Triggered when the corresponding server-side validation or runtime check at the recorded location rejects the request or operation and returns this error message to the caller.
Common situations: See trigger scenarios.
AI-assisted analysis of odysseus-dev/odysseus@f9235ebbf1 (2026-08-14).
Data as JSON: /api/errors/6a85fb94960258bc.
Report an issue: GitHub.