diff --git a/components/API/api_json_to_requestbody.py b/components/API/api_json_to_requestbody.py index 1f7a799..e49a90b 100644 --- a/components/API/api_json_to_requestbody.py +++ b/components/API/api_json_to_requestbody.py @@ -19,11 +19,11 @@ def _canonical_param_name(name: str) -> str: def _default_value(name: str) -> Any: k = name.lower() if "prompt" in k: - return "default prompt" + return "cute cat walking in the futuristic metropolis" if "response_modalities" in k: return "IMAGE" if "model" in k: - return "gemini-3-pro-image-preview" + return "valid-model-name" if "aspect_ratio" in k: return "1:1" if "resolution" in k: diff --git a/components/API/api_schema_registry.py b/components/API/api_schema_registry.py index 7c7dc49..4d2f12d 100644 --- a/components/API/api_schema_registry.py +++ b/components/API/api_schema_registry.py @@ -9,14 +9,6 @@ def _is_service_schema(node: Any) -> bool: def normalize_registry(raw: dict[str, Any] | None) -> dict[str, dict[str, dict[str, Any]]]: - """Normalize API schema JSON to provider->service->schema mapping. - - Supports legacy single-schema format: - {"provider": "Gemini", "request": {...}} - - And new grouped format: - {"Gemini": {"Text2Image Nanobanana": {"provider": "Gemini", "service": "...", "request": {...}}}} - """ if not isinstance(raw, dict): return {} diff --git a/front_end/api_schemas.json b/front_end/api_schemas.json index 803312f..069bd56 100644 --- a/front_end/api_schemas.json +++ b/front_end/api_schemas.json @@ -4,6 +4,7 @@ "provider": "Gemini", "service": "Nanobanana", "possible_parameters": { + "aspect_ratio": ["1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9"], "resolution": [ "1K", "2K", @@ -50,6 +51,7 @@ "provider": "Gemini", "service": "VEO", "possible_parameters": { + "aspectRatio": ["9:16", "16:9"], "durationSeconds": [ "4", "6", @@ -103,6 +105,7 @@ "provider": "Gemini", "service": "Imagen", "possible_parameters": { + "aspect_ratio": ["1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9"], "resolution": [ "1K", "2K" diff --git a/terminal_helpers/api_snippet_to_json.py b/terminal_helpers/api_snippet_to_json.py index ca88929..ff67192 100644 --- a/terminal_helpers/api_snippet_to_json.py +++ b/terminal_helpers/api_snippet_to_json.py @@ -23,7 +23,7 @@ DEFAULT_SERVICE = "" PLACEHOLDER_RE = re.compile(r"\{\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}\}") KNOWN_PARAM_OPTIONS: dict[str, list[str]] = { - "model": ["gemini-3-pro-image-preview", "gemini-2.5-flash-image"], + "model": ["example-model-1", "example-model-2"], "resolution": ["1K", "2K", "4K"], }