@firebase/ai を 2.x から 3.x へアップグレード
@firebase/ai 2.16.0 と 3.0.0 の公開 API を、TypeScript の型から自動的に比較したものです。シグネチャの変更は破壊的変更の候補であり、確定ではありません。
概要
| 削除されたインポートパス | 0 |
|---|---|
| 削除されたエクスポート | 2 |
| 変更されたシグネチャ | 3 |
| 削除されたクラス/インターフェースのメンバー | 53 |
| 変更されたクラス/インターフェースのメンバー | 8 |
| 新たに非推奨 | 11 |
| 要件の変更(engines、peer 依存関係) | 1 |
| 新しいエクスポート | 1 |
削除されたエクスポート
| import | export | kind | 変更前 |
|---|---|---|---|
@firebase/ai | ChatSessionBase | class | class |
@firebase/ai | VertexAIBackend | class | class |
変更されたシグネチャ
| export | 変更前 | 変更後 |
|---|---|---|
@firebase/ai · Tool | FunctionDeclarationsTool | CodeExecutionTool | GoogleMapsTool | GoogleSearchTool | URLContextTool | CodeExecutionTool | FunctionDeclarationsTool | GoogleMapsTool | GoogleSearchTool | URLContextTool |
@firebase/ai · BackendType | "AGENT_PLATFORM" | "VERTEX_AI" | "GOOGLE_AI" | "AGENT_PLATFORM" | "GOOGLE_AI" |
@firebase/ai · ChatSession | class | interface |
削除されたクラス/インターフェースのメンバー
| member | import | 変更前 |
|---|---|---|
AI.location | @firebase/ai | string |
TextPart.inlineData | @firebase/ai | undefined |
TextPart.functionCall | @firebase/ai | undefined |
TextPart.executableCode | @firebase/ai | undefined |
TextPart.functionResponse | @firebase/ai | undefined |
TextPart.codeExecutionResult | @firebase/ai | undefined |
GoogleMaps.enableWidget | @firebase/ai | boolean | undefined |
ChatSession._history | @firebase/ai | Content[] |
ChatSession._apiSettings | @firebase/ai | ApiSettings |
ChatSession.chromeAdapter | @firebase/ai | any |
LiveSession.sendMediaChunks | @firebase/ai | (mediaChunks: GenerativeContentBlob[]): Promise<void> |
LiveSession.sendMediaStream | @firebase/ai | (mediaChunkStream: ReadableStream<GenerativeContentBlob>): Promise<void> |
FileDataPart.text | @firebase/ai | undefined |
FileDataPart.inlineData | @firebase/ai | undefined |
FileDataPart.functionCall | @firebase/ai | undefined |
FileDataPart.executableCode | @firebase/ai | undefined |
FileDataPart.functionResponse | @firebase/ai | undefined |
FileDataPart.codeExecutionResult | @firebase/ai | undefined |
InlineDataPart.text | @firebase/ai | undefined |
InlineDataPart.functionCall | @firebase/ai | undefined |
InlineDataPart.executableCode | @firebase/ai | undefined |
InlineDataPart.functionResponse | @firebase/ai | undefined |
InlineDataPart.codeExecutionResult | @firebase/ai | undefined |
FunctionCallPart.text | @firebase/ai | undefined |
FunctionCallPart.inlineData | @firebase/ai | undefined |
FunctionCallPart.executableCode | @firebase/ai | undefined |
FunctionCallPart.functionResponse | @firebase/ai | undefined |
FunctionCallPart.codeExecutionResult | @firebase/ai | undefined |
GroundingMetadata.retrievalQueries | @firebase/ai | string[] | undefined |
ExecutableCodePart.text | @firebase/ai | undefined |
ExecutableCodePart.thought | @firebase/ai | undefined |
ExecutableCodePart.fileData | @firebase/ai | never |
ExecutableCodePart.inlineData | @firebase/ai | undefined |
ExecutableCodePart.functionCall | @firebase/ai | undefined |
ExecutableCodePart.functionResponse | @firebase/ai | undefined |
ExecutableCodePart.codeExecutionResult | @firebase/ai | undefined |
CountTokensResponse.totalBillableCharacters | @firebase/ai | number | undefined |
FunctionResponsePart.text | @firebase/ai | undefined |
FunctionResponsePart.inlineData | @firebase/ai | undefined |
FunctionResponsePart.functionCall | @firebase/ai | undefined |
FunctionResponsePart.executableCode | @firebase/ai | undefined |
FunctionResponsePart.codeExecutionResult | @firebase/ai | undefined |
CodeExecutionResultPart.text | @firebase/ai | undefined |
CodeExecutionResultPart.thought | @firebase/ai | undefined |
CodeExecutionResultPart.fileData | @firebase/ai | never |
CodeExecutionResultPart.inlineData | @firebase/ai | undefined |
CodeExecutionResultPart.functionCall | @firebase/ai | undefined |
CodeExecutionResultPart.executableCode | @firebase/ai | undefined |
CodeExecutionResultPart.functionResponse | @firebase/ai | undefined |
LanguageModelCreateOptions.topK | @firebase/ai | number | undefined |
LanguageModelCreateOptions.temperature | @firebase/ai | number | undefined |
LanguageModelCreateCoreOptions.topK | @firebase/ai | number | undefined |
LanguageModelCreateCoreOptions.temperature | @firebase/ai | number | undefined |
変更されたクラス/インターフェースのメンバー
| member | 変更前 | 変更後 |
|---|---|---|
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.executableCode | ExecutableCode | undefined | ExecutableCode |
CodeExecutionResultPart.codeExecutionResult | CodeExecutionResult | undefined | CodeExecutionResult |
StartTemplateChatParams.templateVariables | Record<string, unknown> | undefined | Record<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> |
新たに非推奨
| export | @deprecated |
|---|---|
@firebase/ai · GenerationConfig.topK | Not 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.topP | Not 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.temperature | Not 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.candidateCount | Not 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.presencePenalty | Not 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.frequencyPenalty | Not 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.topK | Not 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.topP | Not 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.temperature | Not 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.presencePenalty | Not 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.frequencyPenalty | Not supported in Gemini 3.x and later models. Requests that include this parameter will fail with a 400 error. Omit this parameter. |
要件の変更(engines、peer 依存関係)
| 変更前 | 変更後 | |
|---|---|---|
engines.node | >=20.0.0 | >=24.12.0 |
新しいエクスポート (1)
| import | export | kind |
|---|---|---|
@firebase/ai | TemplateRequest | interface |
このデータを AI エージェントに渡す
Vigia は無料の MCP サーバーです。コーディングエージェントがコードを書く前に、バージョン・破壊的変更・脆弱性を確認できます。登録も API キーも不要です。
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
Cursor に追加VS Code に追加★ GitHub でスターを付ける
その他の MCP クライアント
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }エージェント用スキル (SKILL.md):Vigia を使うタイミングをエージェントに伝えます · プルリクエスト用 GitHub Action
よくある質問
@firebase/ai を 2 から 3 にアップグレードする際の破壊的変更は?
@firebase/ai 2.16.0 と 3.0.0 の間で、Vigia は削除されたエクスポートを 2 件、変更されたシグネチャを 3 件、削除または変更されたクラス/インターフェースのメンバーを 61 件検出しました。
@firebase/ai 3 で非推奨になったものは?
@firebase/ai 3.0.0 では 11 件のエクスポートまたはメンバーが新たに非推奨になりました。
エージェント向け
GET https://vigia.coredls.cloud/v1/packages/npm/@firebase/ai/upgrade?from=2.16.0&to=3.0.0