מה חדש ב-Gemini 3.8 Flash

המודל הכי עדכני מודלים אחרים

‫Gemini 3.8 Flash (gemini-3.8-flash) הוא מודל 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

  • הנדסת תוכנה לטווח ארוך: מספק תוצאות חזקות בבדיקות ביצועים של תכנות בעולם האמיתי, שכתוב קוד מורכב בכמה קבצים והפעלה דטרמיניסטית של כלים. פרטים נוספים זמינים במתודולוגיית ההערכה.
  • סוכנים אוטונומיים: מאפשרים לכם ליצור תהליכי עבודה גמישים לתכנון ולתזמור כלים בכמה שלבים, וכך לצמצם באופן משמעותי את מספר הלולאות שנכשלות ואת מספר השגיאות.
  • תהליכי עבודה מורכבים בארגונים: מספק דיוק מעולה, חשיבה מעמיקה ודיוק עובדתי גבוה במשימות תובעניות בתחום וב-Data pipelines בקנה מידה גדול.
  • מודל ברירת המחדל לסוכנים מנוהלים: סוכן ברירת המחדל לסוכנים מנוהלים, סוכן 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 בערך המאגר 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 ולהסיר תשובות מודל מאוכלסות מראש.
  • ביקורת על הפעלת פונקציות:
    • ממקמים נכסים מולטי-מודאליים בתוך המטען הייעודי (payload) של התגובה.
    • ההוראות בקוד צריכות להיות בתוך \n\n.
    • אם מופיעות שגיאות מסוג Malformed_Function_Call שקשורות לטקסט שלפני הכלי, כדאי לעיין בקטע פתרונות עקיפים לדרישות לגבי טקסט שלפני הכלי.
    • רק אם משתמשים ב-generateContent API: צריך לוודא שכל האובייקטים של FunctionResponse כוללים את call_id ו-name.
  • דרישות בסיסיות ל-Gemini 3: כדי לעדכן את ה-SDK ולשמור על חתימות החשיבה, עיינו בקטע חתימות חשיבה.

תמחור

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

מודלים אחרים

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