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

Function _build_gemini_model_resource

src/api/routes.py:131–144  ·  view source on GitHub ↗

Build a Gemini-compatible model resource payload.

(model_id: str, description: str)

Source from the content-addressed store, hash-verified

129
130
131def _build_gemini_model_resource(model_id: str, description: str) -> Dict[str, Any]:
132 """Build a Gemini-compatible model resource payload."""
133 return {
134 "name": f"models/{model_id}",
135 "displayName": model_id,
136 "description": description,
137 "version": "flow2api",
138 "inputTokenLimit": 0,
139 "outputTokenLimit": 0,
140 "supportedGenerationMethods": [
141 "generateContent",
142 "streamGenerateContent",
143 ],
144 }
145
146
147def _decode_data_url(data_url: str) -> tuple[str, bytes]:

Callers 2

list_gemini_modelsFunction · 0.85
get_gemini_modelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected