ما الجديد في Gemini 3.8 Flash؟

أحدث نموذج نماذج أخرى

‫Gemini 3.8 Flash‏ (gemini-3.8-flash) هو نموذج Flash الأكثر ذكاءً لدينا، وهو مصمّم لهندسة البرامج على المدى الطويل والوكلاء المستقلّين ومهام سير العمل المعقّدة في المؤسسات.

يوضّح هذا الدليل الميزات الجديدة في Gemini 3.8 Flash والتغييرات في واجهة برمجة التطبيقات وأمثلة الرموز البرمجية وإرشادات نقل البيانات.

النموذج الجديد

الطراز رقم تعريف الطراز مستوى التفكير التلقائي الأسعار الوصف
‫Gemini 3.8 Flash gemini-3.8-flash medium يتوفّر نموذج 3.8 Flash حتى نهاية العام بسعر تمهيدي يبلغ 0.75 دولار أمريكي لكل مليون رمز إدخال و3.75 دولار أمريكي لكل مليون رمز إخراج. يُرجى الاطّلاع على الأسعار لمزيد من التفاصيل. نموذج Flash الأكثر ذكاءً لدينا، وهو مصمّم لهندسة البرامج على المدى الطويل والوكلاء المستقلّين ومهام سير العمل المعقّدة في المؤسسات.

يتوافق Gemini 3.8 Flash مع نافذة سياق تضم مليون رمز مميّز، و64 ألف رمز مميّز كحد أقصى للإخراج، ومستويات تفكير قابلة للضبط (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 بسعر تمهيدي يبلغ 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);

جافا

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

جافا

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 API وتعديلات المَعلمات.
  • فرض قواعد التحقّق من صحة التحويلات: يمكنك توحيد المحادثات المتعدّدة التحويلات على previous_interaction_id من جهة الخادم وإزالة ردود النموذج المعبّأة مسبقًا.
  • تدقيق استدعاء الدوال:
    • ضَع مواد العرض المتعدّدة الوسائط داخل حمولة الاستجابة.
    • نسِّق التعليمات المضمّنة باستخدام \n\n.
    • إذا ظهرت لك أخطاء Malformed_Function_Call مرتبطة بالنص قبل الأداة، يُرجى الاطّلاع على الحلول البديلة لمتطلبات النص قبل الأداة.
    • إذا كنت تستخدم generateContent API فقط: تأكَّد من أنّ جميع عناصر FunctionResponse تتضمّن call_id وname.
  • المتطلبات الأساسية لـ Gemini 3: للاطّلاع على تحديثات حزمة SDK والحفاظ على توقيعات الأفكار، يُرجى الانتقال إلى توقيعات الأفكار.

الأسعار

يمكنك الاستفادة من الأسعار التمهيدية في Google AI Studio وGemini Enterprise Agent Platform حتى 31 ديسمبر 2026 لكل من Gemini 3.8 Flash وGemini 3.6 Flash. تسري الأسعار العادية اعتبارًا من 1 يناير 2027. للاطّلاع على مستويات الأسعار الكاملة، يُرجى الانتقال إلى صفحة الأسعار.

نماذج أخرى

الخطوات التالية