style(gemini): apply Prettier to explicit thinking level change

This commit is contained in:
Bl0ck154
2026-11-19 03:59:49 -03:00
committed by diegosouzapw
parent cecb3fbb9b
commit e507625c5d
2 changed files with 9 additions and 9 deletions

View File

@@ -203,10 +203,7 @@ type GeminiToolNameOptions = {
// generationConfig.thinkingConfig (the operator payload-override surface).
// Native thinking-level models require supported enum values. Preserve the
// pre-existing passthrough for models that do not use native thinking levels.
function extractExplicitThinkingLevel(
body: Record<string, unknown>,
model: string
): string | null {
function extractExplicitThinkingLevel(body: Record<string, unknown>, model: string): string | null {
const validatesNativeLevel = isGeminiThinkingLevelModel(model);
const gc = body.generationConfig as Record<string, unknown> | undefined;
const tc = gc?.thinkingConfig as Record<string, unknown> | undefined;

View File

@@ -48,11 +48,14 @@ test("skips invalid nested levels and honors a valid top-level fallback", () =>
});
test("rejects unknown explicit thinking levels without forwarding them", () => {
const config = translatedThinkingConfig({
messages: [{ role: "user", content: "hello" }],
reasoning_effort: "high",
thinkingLevel: "unsupported_level",
}, "gemini-3.8-flash");
const config = translatedThinkingConfig(
{
messages: [{ role: "user", content: "hello" }],
reasoning_effort: "high",
thinkingLevel: "unsupported_level",
},
"gemini-3.8-flash"
);
assert.equal(config.thinkingLevel, "high");
assert.equal(config.thinkingBudget, undefined);
});