Build a Gemini-compatible model resource payload.
(model_id: str, description: str)
| 129 | |
| 130 | |
| 131 | def _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 | |
| 147 | def _decode_data_url(data_url: str) -> tuple[str, bytes]: |
no outgoing calls
no test coverage detected