מה חדש ב-Gemini 3.8 Flash

‫‎3.6 Flash ו-‎3.5 Flash-Lite מודלים אחרים

‫Gemini 3.8 Flash (gemini-3.8-flash) זמין לכלל המשתמשים (GA) ומוכן לשימוש בסביבת ייצור. זהו מודל Flash הכי חכם שלנו, שנועד להנדסת תוכנה לטווח ארוך, לסוכנים אוטונומיים ולתהליכי עבודה מורכבים בארגונים.

במדריך הזה מוסבר מה חדש ב-Gemini 3.8 Flash, אילו שינויים בוצעו ב-API, מוצגות דוגמאות קוד ומופיעות הנחיות להעברה.

המודל החדש

מודל מזהה דגם רמת ההעמקה שמוגדרת כברירת מחדל תמחור תיאור
Gemini 3.8 Flash gemini-3.8-flash medium ‫3.8 Flash זמין עד סוף השנה במחיר היכרות של 0.75 $למיליון טוקנים של קלט ו-3.75 $למיליון טוקנים של פלט. פרטים נוספים מופיעים בדף תמחור. מודל Flash הכי חכם שלנו, שנועד להנדסת תוכנה לטווח ארוך, לסוכנים אוטונומיים ולתהליכי עבודה מורכבים בארגונים.

‫Gemini 3.8 Flash תומך בחלון הקשר של מיליון טוקנים, ב-64, 000 טוקנים מקסימליים של פלט, ברמות חשיבה שניתנות להתאמה (low, ‏ medium,‏ high) ובאותו חבילה מקיפה של כלים מובנים.

למפרט המלא, אפשר לעיין בדף המודל Gemini 3.8 Flash. לפרטים על מחירי מבצע, אפשר לעיין בקטע בנושא מחירים בהמשך או בדף המחירים.

מדריך למתחילים

Python

from google import genai

client = genai.Client()

interaction = client.interactions.create(
    model="gemini-3.8-flash",
    input="Write a three.js script that renders a realistic 3D black hole."
)

print(interaction.output_text)

JavaScript

import { GoogleGenAI } from "@google/genai";

const client = new GoogleGenAI({});

const interaction = await client.interactions.create({
  model: "gemini-3.8-flash",
  input: "Write a three.js script that renders a realistic 3D black hole.",
});

console.log(interaction.output_text);

Java

import com.google.genai.Client;
import com.google.genai.gaos.models.interactions.CreateModelInteraction;
import com.google.genai.gaos.models.interactions.Interaction;
import com.google.genai.gaos.models.interactions.InteractionsInput;
import com.google.genai.gaos.models.interactions.Model;
import com.google.genai.gaos.models.operations.CreateInteractionRequestBody;

Client client = new Client();

CreateModelInteraction params =
    CreateModelInteraction.builder()
        .model(Model.of("gemini-3.8-flash"))
        .input(
            InteractionsInput.of(
                "Write a three.js script that renders a realistic 3D black hole."))
        .build();

Interaction interaction =
    client.interactions.create(CreateInteractionRequestBody.of(params)).interaction().get();

System.out.println(interaction.outputText().orElse(""));

Go

package main

import (
    "context"
    "fmt"
    "log"

    "google.golang.org/genai"
    "google.golang.org/genai/interactions/models/interactions"
    "google.golang.org/genai/interactions/models/operations"
)

func main() {
    ctx := context.Background()
    client, err := genai.NewClient(ctx, nil)
    if err != nil {
        log.Fatal(err)
    }

    res, err := client.Interactions.Create(ctx, operations.CreateInteractionRequest{
        Body: operations.NewCreateInteractionRequestBody(interactions.CreateModelInteraction{
            Model: interactions.Model("gemini-3.8-flash"),
            Input: interactions.NewInteractionsInput("Write a three.js script that renders a realistic 3D black hole."),
        }),
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Interaction.OutputText != nil {
        fmt.Println(*res.Interaction.OutputText)
    }
}

REST

curl "https://generativelanguage.googleapis.com/v1beta/interactions" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H 'Content-Type: application/json' \
  -X POST \
  -d '{
    "model": "gemini-3.8-flash",
    "input": "Write a three.js script that renders a realistic 3D black hole."
  }'

מה חדש ב-Gemini 3.8 Flash

  • הנדסת תוכנה לטווח ארוך: מספקת תוצאות טובות במבחני ביצועים של קידוד בעולם האמיתי, בשינוי מבנה מורכב של קובץ מרובה, ובהפעלה דטרמיניסטית של כלי. פרטים נוספים זמינים בקטע מתודולוגיית ההערכה.
  • סוכנים אוטונומיים: מאפשרים ליצור תהליכי עבודה גמישים לתכנון מרובה שלבים ולתזמור של כלים, וכך לצמצם באופן משמעותי את מספר הלולאות שנכשלו והשגיאות.
  • תהליכי עבודה מורכבים בארגונים: מספק דיוק מעולה, חשיבה רציונלית מעמיקה ורמת דיוק עובדתית גבוהה במשימות מורכבות בתחומים שונים ובפייפליינים רחבי היקף.
  • מודל ברירת המחדל לסוכנים מנוהלים: סוכן ברירת המחדל לסוכנים מנוהלים, סוכן Antigravity, משתמש עכשיו ב-Gemini 3.8 Flash. ‫Antigravity SDK גם משתמש ב-Gemini 3.8 Flash כברירת מחדל.
  • מחיר מבצע: Gemini 3.8 Flash זמין במחיר מבצע של 0.75 $למיליון טוקנים של קלט ו-3.75 $למיליון טוקנים של פלט עד 31 בדצמבר 2026. התמחור הרגיל של 1.50 $למיליון טוקנים של קלט ו-7.50 $למיליון טוקנים של פלט ייכנס לתוקף ב-1 בינואר 2027.

‫Gemini 3.8 Flash יכול להשתמש ביותר טוקנים במשימות מורכבות וארוכות, וזה נעשה בכוונה. כדי לספק תוצאות באיכות גבוהה יותר ביעדים מורכבים שכוללים כמה שלבים, המודל מבצע שלבי חשיבה רציונלית קטנים יותר, מפעיל כלים באופן איטרטיבי ומאמת את העבודה שלו לאורך הדרך. לא כל תהליך עבודה צריך את רמת האימות הזו. למשימות שוטפות, אפשר להפחית את מאמץ החשיבה הרציונלית כדי לצמצם את צריכת הטוקנים. אפשרות אחרת היא להמשיך להשתמש ב-Gemini 3.6 Flash.

הסבר על רמות החשיבה הרציונלית

‫Gemini 3.8 Flash מאפשר לכם לשלוט בגמישות בנתוני השהיה וברמת האינטליגנציה על ידי שינוי רמת החשיבה של המודל:

  • מאמץ חשיבה נמוך: מקצר את הזמן עד לקבלת תשובה למשימות שבהן חביון הוא קריטי, כמו צינורות תגובה לאירועים, צ'אט בזמן אמת, טיוטות כתיבה וניתוח נתונים מהיר.
  • בינונית (ברירת מחדל): האיכות הכי טובה לרוב המשימות. מומלץ לשימוש בתרחישי שימוש מורכבים של קוד וסוכנים, ומספק רמת דיוק גבוהה יותר במעבר הראשון.
  • מאמץ חשיבה גבוה: ממקסם את יכולות החשיבה הרציונלית של המודל ואת יכולות התיאום בין הכלים. הכי מתאים להסקת מסקנות מעמיקה, למתמטיקה ולמשימות קשות שמורכבות מכמה שלבים.

בדוגמה הבאה, הערך של thinking_level מוגדר כ-medium עבור בקשה מורכבת לניתוח קוד:

Python

from google import genai

client = genai.Client()

interaction = client.interactions.create(
    model="gemini-3.8-flash",
    input="Analyze this payment processing pipeline for race conditions during retry attempts and rewrite the transaction locks safely.",
    generation_config={
        "thinking_level": "medium"  # Balanced reasoning effort for complex tasks
    }
)

print(interaction.output_text)

JavaScript

import { GoogleGenAI } from "@google/genai";

const client = new GoogleGenAI({});

const interaction = await client.interactions.create({
  model: "gemini-3.8-flash",
  input: "Analyze this payment processing pipeline for race conditions during retry attempts and rewrite the transaction locks safely.",
  generation_config: {
    thinking_level: "medium"
  }
});

console.log(interaction.output_text);

Java

import com.google.genai.Client;
import com.google.genai.gaos.models.interactions.CreateModelInteraction;
import com.google.genai.gaos.models.interactions.GenerationConfig;
import com.google.genai.gaos.models.interactions.Interaction;
import com.google.genai.gaos.models.interactions.InteractionsInput;
import com.google.genai.gaos.models.interactions.Model;
import com.google.genai.gaos.models.interactions.ThinkingLevel;
import com.google.genai.gaos.models.operations.CreateInteractionRequestBody;

Client client = new Client();

CreateModelInteraction params =
    CreateModelInteraction.builder()
        .model(Model.of("gemini-3.8-flash"))
        .input(
            InteractionsInput.of(
                "Analyze this payment processing pipeline for race conditions during retry attempts and rewrite the transaction locks safely."))
        .generationConfig(
            GenerationConfig.builder()
                .thinkingLevel(ThinkingLevel.MEDIUM) // Balanced reasoning effort for complex tasks
                .build())
        .build();

Interaction interaction =
    client.interactions.create(CreateInteractionRequestBody.of(params)).interaction().get();

System.out.println(interaction.outputText().orElse(""));

Go

package main

import (
    "context"
    "fmt"
    "log"

    "google.golang.org/genai"
    "google.golang.org/genai/interactions/models/interactions"
    "google.golang.org/genai/interactions/models/operations"
)

func main() {
    ctx := context.Background()
    client, err := genai.NewClient(ctx, nil)
    if err != nil {
        log.Fatal(err)
    }

    res, err := client.Interactions.Create(ctx, operations.CreateInteractionRequest{
        Body: operations.NewCreateInteractionRequestBody(interactions.CreateModelInteraction{
            Model: interactions.Model("gemini-3.8-flash"),
            Input: interactions.NewInteractionsInput("Analyze this payment processing pipeline for race conditions during retry attempts and rewrite the transaction locks safely."),
            GenerationConfig: &interactions.GenerationConfig{
                ThinkingLevel: interactions.ThinkingLevelMedium.ToPointer(), // Balanced reasoning effort for complex tasks
            },
        }),
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Interaction.OutputText != nil {
        fmt.Println(*res.Interaction.OutputText)
    }
}

REST

curl "https://generativelanguage.googleapis.com/v1beta/interactions" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H 'Content-Type: application/json' \
  -X POST \
  -d '{
    "model": "gemini-3.8-flash",
    "input": "Analyze this payment processing pipeline for race conditions during retry attempts and rewrite the transaction locks safely.",
    "generation_config": {
      "thinking_level": "medium"
    }
  }'

סוכן Antigravity מעודכן

בגלל הביצועים המשופרים ויכולות הניתוח המשופרות שלו, סוכן Antigravity ב-Gemini Managed Agents מבוסס עכשיו על Gemini 3.8 Flash כברירת מחדל.

Python

from google import genai

client = genai.Client()

interaction = client.interactions.create(
    agent="antigravity-preview-09-2026",
    input=(
        "Audit https://web.dev for performance, Core Web Vitals, and SEO. "
        "Query Google's PageSpeed Insights API for both Mobile and Desktop strategies. "
        "Check search indexing with Google Search for site:web.dev. "
        "Format the output as a side-by-side scorecard table with prioritized fixes."
    ),
    environment="remote",
)

print(interaction.output_text)

JavaScript

import { GoogleGenAI } from "@google/genai";

const client = new GoogleGenAI({});

const interaction = await client.interactions.create({
  agent: "antigravity-preview-09-2026",
  input: "Audit https://web.dev for performance, Core Web Vitals, and SEO. Query Google's PageSpeed Insights API for both Mobile and Desktop strategies. Check search indexing with Google Search for site:web.dev. Format the output as a side-by-side scorecard table with prioritized fixes.",
  environment: "remote",
}, { timeout: 300000 });

console.log(interaction.output_text);

Java

import com.google.genai.Client;
import com.google.genai.gaos.models.interactions.AgentOption;
import com.google.genai.gaos.models.interactions.CreateAgentInteraction;
import com.google.genai.gaos.models.interactions.CreateAgentInteractionEnvironment;
import com.google.genai.gaos.models.interactions.Interaction;
import com.google.genai.gaos.models.interactions.InteractionsInput;
import com.google.genai.gaos.models.operations.CreateInteractionRequestBody;

Client client = new Client();

CreateAgentInteraction params =
    CreateAgentInteraction.builder()
        .agent(AgentOption.of("antigravity-preview-09-2026"))
        .input(
            InteractionsInput.of(
                "Audit https://web.dev for performance, Core Web Vitals, and SEO. "
                    + "Query Google's PageSpeed Insights API for both Mobile and Desktop strategies. "
                    + "Check search indexing with Google Search for site:web.dev. "
                    + "Format the output as a side-by-side scorecard table with prioritized fixes."))
        .environment(CreateAgentInteractionEnvironment.of("remote"))
        .build();

Interaction interaction =
    client.interactions.create(CreateInteractionRequestBody.of(params)).interaction().get();

System.out.println(interaction.outputText().orElse(""));

Go

package main

import (
    "context"
    "fmt"
    "log"

    "google.golang.org/genai"
    "google.golang.org/genai/interactions/models/interactions"
    "google.golang.org/genai/interactions/models/operations"
)

func main() {
    ctx := context.Background()
    client, err := genai.NewClient(ctx, nil)
    if err != nil {
        log.Fatal(err)
    }

    res, err := client.Interactions.Create(ctx, operations.CreateInteractionRequest{
        Body: operations.NewCreateInteractionRequestBody(interactions.CreateAgentInteraction{
            Agent: interactions.AgentOption("antigravity-preview-09-2026"),
            Input: interactions.NewInteractionsInput(
                "Audit https://web.dev for performance, Core Web Vitals, and SEO. " +
                    "Query Google's PageSpeed Insights API for both Mobile and Desktop strategies. " +
                    "Check search indexing with Google Search for site:web.dev. " +
                    "Format the output as a side-by-side scorecard table with prioritized fixes.",
            ),
            Environment: genai.Ptr(interactions.NewCreateAgentInteractionEnvironment("remote")),
        }),
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Interaction.OutputText != nil {
        fmt.Println(*res.Interaction.OutputText)
    }
}

REST

curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "Content-Type: application/json" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-d '{
    "agent": "antigravity-preview-09-2026",
    "input": "Audit https://web.dev for performance, Core Web Vitals, and SEO. Query Google'\''s PageSpeed Insights API for both Mobile and Desktop strategies. Check search indexing with Google Search for site:web.dev. Format the output as a side-by-side scorecard table with prioritized fixes.",
    "environment": "remote"
}'

אפשר להגדיר את מודל Gemini הבסיסי באמצעות agent_config.

רשימת משימות להעברה

  `/gemini-api-dev migrate my app to Gemini 3.8 Flash`

מעבר ל-gemini-3.8-flash

  • עדכון מזהה המודל: משנים את מחרוזת מודל היעד ל-gemini-3.8-flash.
  • הגדרת רמת החשיבה: מחליפים את thinking_budget במחרוזת enum‏ thinking_level. שימו לב: אי אפשר להשתמש ב-minimal ב-Gemini 3.8 Flash. צריך לבחור באפשרות low, medium (ברירת מחדל) או high.
  • החלת שינויים בפרמטרים של Gemini 3 API: הסרת פרמטרים של דגימה שהוצאו משימוש (temperature,‏ top_p,‏ top_k),‏ candidate_count (לא נתמך ב-Gemini 3 ובגרסאות מתקדמות יותר) ופניות למודל עם מילוי מראש. שינויים ב-Gemini 3.6 API ועדכוני פרמטרים
  • אכיפת כללי אימות של תורות: סטנדרטיזציה של שיחות רב-שלביות בצד השרת previous_interaction_id והסרה של תורות מודל שמולאו מראש.
  • ביקורת על הפעלת פונקציות:
    • הנחת נכסים מולטימודאליים בתוך מטען הנתונים של התגובה.
    • כדי לעצב הוראות מוטבעות, משתמשים בתג \n\n.
    • אם מופיעות שגיאות Malformed_Function_Call שקשורות לטקסט שמופיע לפני הכלי, אפשר לעיין במאמר פתרונות עקיפים לדרישות לגבי טקסט שמופיע לפני הכלי.
    • רק אם משתמשים ב-generateContent API: מוודאים שכל האובייקטים FunctionResponse כוללים את call_id ו-name.
  • הדרישות הבסיסיות של Gemini 3: למידע על עדכוני SDK ועל שמירת חתימות מחשבה, ראו חתימות מחשבה.

תמחור

עד 31 בדצמבר 2026, תוכלו ליהנות ממחירי היכרות לשימוש ב-Gemini 3.8 Flash וב-Gemini 3.6 Flash ב-Google AI Studio וב-Gemini Enterprise Agent Platform. המחירים הרגילים ייכנסו לתוקף ב-1 בינואר 2027. למידע על רמות התמחור המלאות, אפשר לעיין בדף המחירון.

מודלים אחרים

המאמרים הבאים