ویژگی‌های جدید Gemini 3.8 Flash

‫‎3.6 Flash و ‎3.5 Flash-Lite مدل‌های دیگر

‫Gemini 3.8 Flash‏ (gemini-3.8-flash) به‌طور کلی دردسترس (GA) است و برای استفاده در تولید آماده است. این مدل هوشمندترین مدل Flash ما است که برای مهندسی نرم‌افزار بلندمدت، عامل‌های خودکار، و گردش‌های کار پیچیده سازمانی طراحی شده است.

این راهنما توضیح می‌دهد که ‎3.8 Flash در Gemini چه ویژگی‌های جدیدی دارد، تغییرات API، نمونه‌های کد، و راهنمایی‌های انتقال.

مدل جدید

مدل شناسه مدل سطح پیش‌فرض «اندیشگر» قیمت‌گذاری شرح
Gemini 3.8 Flash gemini-3.8-flash medium ‫3.8 Flash تا پایان سال با قیمت معرفی ۰٫۷۵ دلار برای ۱ میلیون داده‌واحد ورودی و ۳٫۷۵ دلار برای ۱ میلیون داده‌واحد برونداد دردسترس است؛ برای جزئیات بیشتر، قیمت‌گذاری را ببینید. هوشمندترین مدل Flash ما که برای مهندسی نرم‌افزار بلندمدت، عامل‌های خودکار، و گردش‌های کار پیچیده سازمانی طراحی شده است.

‫Gemini 3.8 Flash از پنجره زمینه‌ای ۱ میلیون داده‌واحد (توکن)، حداکثر ۶۴ هزار داده‌واحد برونداد، سطوح تفکر قابل‌تنظیم (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);

جاوا

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(""));

رفتن

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 با نرخ مقدماتی ۰٫۷۵ دلار برای ۱ میلیون کد ورودی و ۳٫۷۵ دلار برای ۱ میلیون کد خروجی تا ۳۱ دسامبر ۲۰۲۶ دردسترس است. قیمت‌گذاری استاندارد ۱٫۵۰ دلار برای ۱ میلیون داده‌واحد ورودی و ۷٫۵۰ دلار برای ۱ میلیون داده‌واحد برونداد از ۱ ژانویه ۲۰۲۷ اعمال می‌شود.

‫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);

جاوا

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(""));

رفتن

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» اکنون به‌طور پیش‌فرض با 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);

جاوا

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(""));

رفتن

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» و به‌روزرسانی‌های پارامتر را ببینید.
  • اجرای قوانین اعتبارسنجی نوبت: مکالمه‌های چند نوبتی را در سمت سرور previous_interaction_id استانداردسازی کنید و نوبت‌های مدل پیش‌تکمیل‌شده را بردارید.
  • فراخوانی تابع ممیزی:
    • دارایی‌های چندوجهی را در محتوای پاسخ قرار دهید.
    • دستورالعمل‌های درون‌خطی را بااستفاده از \n\n قالب‌بندی کنید.
    • اگر Malformed_Function_Call خطای مربوط به نوشتار پیش‌ابزار مشاهده کردید، راهکارهای دور زدن الزامات نوشتار پیش‌ابزار را ببینید.
    • فقط درصورت استفاده از API generateContent: مطمئن شوید همه FunctionResponse اشیا شامل call_id و name باشند.
  • الزامات پایه Gemini 3: برای به‌روزرسانی‌های «کیت توسعه نرم‌افزار» و حفظ امضای اندیشه، امضاهای اندیشه را ببینید.

قیمت‌گذاری

تا ۳۱ دسامبر ۲۰۲۶ از قیمت‌های معرفی در سراسر Google AI Studio و پلاتفرم Gemini Enterprise Agent برای Gemini 3.8 Flash و Gemini 3.6 Flash بهره‌مند شوید. قیمت استاندارد از ۱ ژانویه ۲۰۲۷ اعمال می‌شود. برای سطوح قیمت‌گذاری کامل، صفحه قیمت‌گذاری را ببینید.

مدل‌های دیگر

قدم بعدی چیست