MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / get_gemini_model

Function get_gemini_model

src/api/routes.py:840–850  ·  view source on GitHub ↗

Return a single model using Gemini-compatible response shape.

(model: str, api_key: str = Depends(verify_api_key_flexible))

Source from the content-addressed store, hash-verified

838@router.get("/v1beta/models/{model}")
839@router.get("/models/{model}")
840async def get_gemini_model(model: str, api_key: str = Depends(verify_api_key_flexible)):
841 """Return a single model using Gemini-compatible response shape."""
842 catalog = _get_gemini_model_catalog()
843 description = catalog.get(model)
844 if not description:
845 return JSONResponse(
846 status_code=404,
847 content=_build_gemini_error_payload(404, f"Model not found: {model}"),
848 )
849
850 return _build_gemini_model_resource(model, description)
851
852
853@router.post("/v1/chat/completions")

Callers

nothing calls this directly

Calls 3

Tested by

no test coverage detected