odysseus-dev/odysseus · error · HTTPException
endpoint_url is required (choose from /api/models)
Error message
endpoint_url is required (choose from /api/models)
What it means
Error "endpoint_url is required (choose from /api/models)" thrown in odysseus-dev/odysseus.
Source
Thrown at routes/session_routes.py:368
_db = SessionLocal()
try:
q = _db.query(ModelEndpoint).filter(
ModelEndpoint.id == endpoint_id.strip(),
ModelEndpoint.is_enabled == True,
)
if user:
q = owner_filter(q, ModelEndpoint, user)
endpoint_row = q.first()
if not endpoint_row:
raise HTTPException(400, "Model endpoint no longer exists")
endpoint_base_url = endpoint_row.base_url or ""
endpoint_api_key = endpoint_row.api_key or ""
endpoint_url = build_chat_url(normalize_base(endpoint_base_url))
finally:
_db.close()
if not endpoint_url and not skip_val:
raise HTTPException(400, "endpoint_url is required (choose from /api/models)")
model_to_use = model
request_api_key = api_key.strip() if api_key else ""
effective_api_key = request_api_key or endpoint_api_key
validation_headers = None
if effective_api_key:
from src.endpoint_resolver import build_headers
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(View on GitHub (pinned to f9235ebbf1)
Solutions
- Pass endpoint_url chosen from /api/models.
- Fix the client to include the endpoint_url field.
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/3fe8b91a533a8ea3.
Report an issue: GitHub.