INNER CODE UNIT · Python
_protocol_from_model
canarybyte/veridrop · web/server.py:67
def _protocol_from_model(model: str) -> str:
normalized = model.strip().lower()
if normalized.startswith(("gemini-", "models/gemini-")):
return "gemini"
if normalized.startswith(("gpt-", "o1", "o3", "o4")):
return "openai"
return "anthropic"
def _model_choices() -> list[dict[str, str]]:
"""Curated dropdown — 4 most-tested model names. Free-form input still
accepts anything; lookup_model() prefix-matches snapshot/alias forms.
We keep it short on purpose:
- Opus 4.7 + Opus 4.6: top-tier choices
- Sonnet 4.6: most popular
- Haiku 4.5 in snapshot form (-20251001) because some relays only route
the snapshot ID, not the bare alias.