mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 19:06:11 +00:00
Ask Google for the lowest rung it has rather than for none
Google's compatibility layer has no word for off. Sending reasoning_effort "none" is refused outright, so choosing Thinking → Off made every cleanup fail and paste the raw transcript instead: HTTP 400: Request contains an invalid argument. (INVALID_ARGUMENT) Measured against gemini-3.5-flash-lite, asking it to reply "ok": nothing sent 50.59s reasoning_effort "none" 400 reasoning_effort "minimal" 15.40s reasoning_effort "low" 53.35s reasoning_effort "high" 63.83s So "none" lands on "minimal", which is both accepted and the quickest of them, and quickest is what cleanup wants. The thinking_config route the documentation offers is an SDK wrapper and is not a field this endpoint knows: sending it is "Unknown name \"google\"". Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
+3
-3
@@ -404,11 +404,11 @@ class Cleanup(DikteTest):
|
||||
self.assertEqual(payload["reasoning_effort"], "low")
|
||||
self.assertNotIn("reasoning", payload)
|
||||
|
||||
def test_gemini_is_told_to_stop_thinking_rather_than_left_alone(self):
|
||||
""""none" is the one level worth sending: Flash thinks by default."""
|
||||
def test_off_is_asked_for_as_the_lowest_rung_google_actually_has(self):
|
||||
"""Sending "none" is a 400, and Flash left alone thinks."""
|
||||
_, calls = self.call(chat_reply("Hello."), reasoning="none",
|
||||
provider="gemini", service="Google AI Studio")
|
||||
self.assertEqual(sent_json(calls[0])["reasoning_effort"], "none")
|
||||
self.assertEqual(sent_json(calls[0])["reasoning_effort"], "minimal")
|
||||
|
||||
def test_a_rung_google_does_not_have_lands_on_the_nearest_one(self):
|
||||
for asked in ("xhigh", "max"):
|
||||
|
||||
@@ -116,7 +116,7 @@ class GoogleAiStudio(DikteTest):
|
||||
"https://generativelanguage.googleapis.com/v1beta/openai/chat/completions")
|
||||
payload = sent_json(calls[0])
|
||||
self.assertEqual(payload["model"], "gemini-3.5-flash-lite")
|
||||
self.assertEqual(payload["reasoning_effort"], "none")
|
||||
self.assertEqual(payload["reasoning_effort"], "minimal")
|
||||
self.assertIn("uh, done", payload["messages"][1]["content"])
|
||||
|
||||
def test_the_key_travels_as_a_bearer_token(self):
|
||||
|
||||
Reference in New Issue
Block a user