fix(ai): Update Gemini model ID to gemini-1.5-flash-001

- Changes the model ID from the generic 'gemini-1.5-flash' to the specific 'gemini-1.5-flash-001'.
- This resolves the '404 NOT_FOUND' error where the API could not locate the generic model alias in the v1beta API version.
This commit is contained in:
2026-01-03 10:24:51 +00:00
parent 0aad604339
commit 844ffa3eea

View File

@@ -349,8 +349,8 @@ def call_gemini_flash(prompt, system_instruction=None, temperature=0.3, json_mod
if json_mode:
config["response_mime_type"] = "application/json"
# Der Modell-Name muss oft explizit sein, 'gemini-1.5-flash' ist Standard
model_id = "gemini-1.5-flash"
# Verwende eine spezifische Version, die oft stabiler ist
model_id = "gemini-1.5-flash-001"
response = client.models.generate_content(
model=model_id,
@@ -391,7 +391,7 @@ def call_openai_chat(prompt, temperature=0.3, model=None, response_format_json=F
# NEU: Client Instanziierung
client = genai.Client(api_key=api_key)
model_id = "gemini-1.5-flash"
model_id = "gemini-1.5-flash-001"
response = client.models.generate_content(
model=model_id,