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(""));
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. تستخدم حزمة تطوير البرامج (SDK) الخاصة بـ Antigravity أيضًا نموذج 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.7 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(""));
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 المُدارون" يستند الآن إلى نموذج 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(""));
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. - إزالة مَعلمات أخذ العيّنات المتوقّفة نهائيًا:
- إزالة
temperatureوtop_pوtop_kمن إعدادات الإنشاء - استبدِل
thinking_budgetبسلسلة التعدادthinking_level. يُرجى العِلم أنّminimalغير متوافق مع الإصدار 3.8 من Flash. - إزالة
candidate_count(غير متوافق مع الإصدار 3 من Gemini والإصدارات الأحدث)
- إزالة
- فرض قواعد التحقّق من الدور:
- توحيد المحادثات المترابطة على
previous_interaction_idمن جهة الخادم - إزالة أدوار النموذج التي تم ملؤها مسبقًا
- توحيد المحادثات المترابطة على
- تدقيق استدعاء الدوال:
- ضَع مواد العرض المتعدّدة الوسائط داخل حمولة الردّ.
- يمكنك تنسيق التعليمات المضمّنة باستخدام
\n\n. - إذا ظهرت لك أخطاء
Malformed_Function_Callمرتبطة بنص ما قبل الأداة، اطّلِع على حلول بديلة لمتطلبات نص ما قبل الأداة. - في حال استخدام generateContent API فقط: تأكَّد من أنّ جميع عناصر
FunctionResponseتتضمّنcall_idوname.
- متطلبات الإصدار الأساسي من Gemini 3: للاطّلاع على تحديثات حزمة تطوير البرامج (SDK) والحفاظ على التوقيع الفكري، يُرجى الرجوع إلى قائمة التحقّق من عملية نقل البيانات إلى Gemini 3.5.
الأسعار
يمكنك الاستفادة من الأسعار التمهيدية في Google AI Studio وGemini Enterprise Agent Platform حتى 31 ديسمبر 2026 لطُرز Gemini 3.8 Flash وGemini 3.7 Flash وGemini 3.6 Flash. سيبدأ تطبيق الأسعار العادية في 1 يناير 2027. للاطّلاع على فئات الأسعار الكاملة، يُرجى الانتقال إلى صفحة الأسعار.
الخطوات التالية
- راجِع مواصفات واجهة برمجة التطبيقات في نظرة عامة على النماذج.
- استكشِف تنسيق الوكلاء المتعدّدين في نظرة عامة على Interactions API.
- اختبار الطلبات وتحسينها في Google AI Studio