Vigia

Memperbarui @firebase/ai dari 2.x ke 3.x

Perbandingan API publik @firebase/ai 2.16.0 dan 3.0.0, dihitung otomatis dari tipe TypeScript-nya. Tanda tangan yang berubah adalah kemungkinan perubahan tidak kompatibel, bukan kepastian.

Ringkasan

Jalur impor yang dihapus0
Ekspor yang dihapus2
Tanda tangan yang berubah3
Anggota kelas atau antarmuka yang dihapus53
Anggota kelas atau antarmuka yang berubah8
Baru ditandai usang11
Perubahan persyaratan (engines, dependensi peer)1
Ekspor baru1

Ekspor yang dihapus

importexportkindSebelum
@firebase/aiChatSessionBaseclassclass
@firebase/aiVertexAIBackendclassclass

Tanda tangan yang berubah

exportSebelumSesudah
@firebase/ai · ToolFunctionDeclarationsTool | CodeExecutionTool | GoogleMapsTool | GoogleSearchTool | URLContextToolCodeExecutionTool | FunctionDeclarationsTool | GoogleMapsTool | GoogleSearchTool | URLContextTool
@firebase/ai · BackendType"AGENT_PLATFORM" | "VERTEX_AI" | "GOOGLE_AI""AGENT_PLATFORM" | "GOOGLE_AI"
@firebase/ai · ChatSessionclassinterface

Anggota kelas atau antarmuka yang dihapus

memberimportSebelum
AI.location@firebase/aistring
TextPart.inlineData@firebase/aiundefined
TextPart.functionCall@firebase/aiundefined
TextPart.executableCode@firebase/aiundefined
TextPart.functionResponse@firebase/aiundefined
TextPart.codeExecutionResult@firebase/aiundefined
GoogleMaps.enableWidget@firebase/aiboolean | undefined
ChatSession._history@firebase/aiContent[]
ChatSession._apiSettings@firebase/aiApiSettings
ChatSession.chromeAdapter@firebase/aiany
LiveSession.sendMediaChunks@firebase/ai(mediaChunks: GenerativeContentBlob[]): Promise<void>
LiveSession.sendMediaStream@firebase/ai(mediaChunkStream: ReadableStream<GenerativeContentBlob>): Promise<void>
FileDataPart.text@firebase/aiundefined
FileDataPart.inlineData@firebase/aiundefined
FileDataPart.functionCall@firebase/aiundefined
FileDataPart.executableCode@firebase/aiundefined
FileDataPart.functionResponse@firebase/aiundefined
FileDataPart.codeExecutionResult@firebase/aiundefined
InlineDataPart.text@firebase/aiundefined
InlineDataPart.functionCall@firebase/aiundefined
InlineDataPart.executableCode@firebase/aiundefined
InlineDataPart.functionResponse@firebase/aiundefined
InlineDataPart.codeExecutionResult@firebase/aiundefined
FunctionCallPart.text@firebase/aiundefined
FunctionCallPart.inlineData@firebase/aiundefined
FunctionCallPart.executableCode@firebase/aiundefined
FunctionCallPart.functionResponse@firebase/aiundefined
FunctionCallPart.codeExecutionResult@firebase/aiundefined
GroundingMetadata.retrievalQueries@firebase/aistring[] | undefined
ExecutableCodePart.text@firebase/aiundefined
ExecutableCodePart.thought@firebase/aiundefined
ExecutableCodePart.fileData@firebase/ainever
ExecutableCodePart.inlineData@firebase/aiundefined
ExecutableCodePart.functionCall@firebase/aiundefined
ExecutableCodePart.functionResponse@firebase/aiundefined
ExecutableCodePart.codeExecutionResult@firebase/aiundefined
CountTokensResponse.totalBillableCharacters@firebase/ainumber | undefined
FunctionResponsePart.text@firebase/aiundefined
FunctionResponsePart.inlineData@firebase/aiundefined
FunctionResponsePart.functionCall@firebase/aiundefined
FunctionResponsePart.executableCode@firebase/aiundefined
FunctionResponsePart.codeExecutionResult@firebase/aiundefined
CodeExecutionResultPart.text@firebase/aiundefined
CodeExecutionResultPart.thought@firebase/aiundefined
CodeExecutionResultPart.fileData@firebase/ainever
CodeExecutionResultPart.inlineData@firebase/aiundefined
CodeExecutionResultPart.functionCall@firebase/aiundefined
CodeExecutionResultPart.executableCode@firebase/aiundefined
CodeExecutionResultPart.functionResponse@firebase/aiundefined
LanguageModelCreateOptions.topK@firebase/ainumber | undefined
LanguageModelCreateOptions.temperature@firebase/ainumber | undefined
LanguageModelCreateCoreOptions.topK@firebase/ainumber | undefined
LanguageModelCreateCoreOptions.temperature@firebase/ainumber | undefined

Anggota kelas atau antarmuka yang berubah

memberSebelumSesudah
ChatSession.constructor(apiSettings: ApiSettings, model: string, chromeAdapter?: ChromeAdapter | undefined, params?: StartChatParams | undefined, requestOptions?: RequestOptions | undefined): ChatSession
GenerativeModel.generateContent(request: string | GenerateContentRequest | (string | Part)[], singleRequestOptions?: SingleRequestOptions | undefined): Promise<GenerateContentResult>(request: string | (string | Part)[] | GenerateContentRequest, singleRequestOptions?: SingleRequestOptions | undefined): Promise<GenerateContentResult>
GenerativeModel.generateContentStream(request: string | GenerateContentRequest | (string | Part)[], singleRequestOptions?: SingleRequestOptions | undefined): Promise<GenerateContentStreamResult>(request: string | (string | Part)[] | GenerateContentRequest, singleRequestOptions?: SingleRequestOptions | undefined): Promise<GenerateContentStreamResult>
ExecutableCodePart.executableCodeExecutableCode | undefinedExecutableCode
CodeExecutionResultPart.codeExecutionResultCodeExecutionResult | undefinedCodeExecutionResult
StartTemplateChatParams.templateVariablesRecord<string, unknown> | undefinedRecord<string, unknown>
TemplateGenerativeModel.generateContent(templateId: string, templateVariables: Record<string, unknown>, singleRequestOptions?: SingleRequestOptions | undefined, templateToolConfig?: TemplateToolConfig | undefined): Promise<GenerateContentResult>(request: TemplateRequest, singleRequestOptions?: SingleRequestOptions | undefined): Promise<GenerateContentResult>
TemplateGenerativeModel.generateContentStream(templateId: string, templateVariables: Record<string, unknown>, singleRequestOptions?: SingleRequestOptions | undefined, templateToolConfig?: TemplateToolConfig | undefined): Promise<GenerateContentStreamResult>(request: TemplateRequest, singleRequestOptions?: SingleRequestOptions | undefined): Promise<GenerateContentStreamResult>

Baru ditandai usang

export@deprecated
@firebase/ai · GenerationConfig.topKNot supported in Gemini 3.x and later models. The model will ignore this parameter if it's included in a request. Omit this parameter and let the model manage sampling automatically.
@firebase/ai · GenerationConfig.topPNot supported in Gemini 3.x and later models. The model will ignore this parameter if it's included in a request. Omit this parameter and let the model manage sampling automatically.
@firebase/ai · GenerationConfig.temperatureNot supported in Gemini 3.x and later models. The model will ignore this parameter if it's included in a request. Omit this parameter and let the model manage sampling automatically.
@firebase/ai · GenerationConfig.candidateCountNot supported in Gemini 3.x and later models. The model will ignore this parameter if it's included in a request. Make parallel requests instead.
@firebase/ai · GenerationConfig.presencePenaltyNot supported in Gemini 3.x and later models. Requests that include this parameter will fail with a 400 error. Omit this parameter.
@firebase/ai · GenerationConfig.frequencyPenaltyNot supported in Gemini 3.x and later models. Requests that include this parameter will fail with a 400 error. Omit this parameter.
@firebase/ai · LiveGenerationConfig.topKNot supported in Gemini 3.x and later models. The model will ignore this parameter if it's included in a request. Omit this parameter and let the model manage sampling automatically.
@firebase/ai · LiveGenerationConfig.topPNot supported in Gemini 3.x and later models. The model will ignore this parameter if it's included in a request. Omit this parameter and let the model manage sampling automatically.
@firebase/ai · LiveGenerationConfig.temperatureNot supported in Gemini 3.x and later models. The model will ignore this parameter if it's included in a request. Omit this parameter and let the model manage sampling automatically.
@firebase/ai · LiveGenerationConfig.presencePenaltyNot supported in Gemini 3.x and later models. Requests that include this parameter will fail with a 400 error. Omit this parameter.
@firebase/ai · LiveGenerationConfig.frequencyPenaltyNot supported in Gemini 3.x and later models. Requests that include this parameter will fail with a 400 error. Omit this parameter.

Perubahan persyaratan (engines, dependensi peer)

SebelumSesudah
engines.node>=20.0.0>=24.12.0
Ekspor baru (1)
importexportkind
@firebase/aiTemplateRequestinterface

Berikan fakta ini ke agen AI Anda

Vigia adalah server MCP gratis: agen coding Anda memeriksa versi, perubahan yang merusak kompatibilitas, dan kerentanan sebelum menulis kode. Tanpa pendaftaran, tanpa kunci API.

claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp

Tambahkan ke CursorTambahkan ke VS Code★ Bintang di GitHub

Klien MCP lainnya
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }

Skill agen (SKILL.md): memberi tahu agen kapan memakai Vigia · GitHub Action untuk pull request

Pertanyaan umum

Apa saja perubahan tidak kompatibel saat memperbarui @firebase/ai dari 2 ke 3?

Antara @firebase/ai 2.16.0 dan 3.0.0, Vigia menemukan 2 ekspor yang dihapus, 3 tanda tangan yang berubah, dan 61 anggota kelas atau antarmuka yang dihapus atau berubah.

Apa yang ditandai usang di @firebase/ai 3?

11 ekspor atau anggota baru ditandai usang di @firebase/ai 3.0.0.

Untuk agen

GET https://vigia.coredls.cloud/v1/packages/npm/@firebase/ai/upgrade?from=2.16.0&to=3.0.0