Passer de @firebase/ai 2.x à 3.x
Comparaison de l’API publique de @firebase/ai 2.16.0 et 3.0.0, calculée automatiquement à partir de leurs types TypeScript. Une signature modifiée est un changement incompatible possible, pas une certitude.
Résumé
| Chemins d’importation supprimés | 0 |
|---|---|
| Exports supprimés | 2 |
| Signatures modifiées | 3 |
| Membres de classes ou d’interfaces supprimés | 53 |
| Membres de classes ou d’interfaces modifiés | 8 |
| Nouvelles dépréciations | 11 |
| Changements d’exigences (engines, dépendances peer) | 1 |
| Nouveaux exports | 1 |
Exports supprimés
| import | export | kind | Avant |
|---|---|---|---|
@firebase/ai | ChatSessionBase | class | class |
@firebase/ai | VertexAIBackend | class | class |
Signatures modifiées
| export | Avant | Après |
|---|---|---|
@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 |
Membres de classes ou d’interfaces supprimés
| member | import | Avant |
|---|---|---|
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 |
Membres de classes ou d’interfaces modifiés
| member | Avant | Après |
|---|---|---|
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> |
Nouvelles dépréciations
| 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. |
Changements d’exigences (engines, dépendances peer)
| Avant | Après | |
|---|---|---|
engines.node | >=20.0.0 | >=24.12.0 |
Nouveaux exports (1)
| import | export | kind |
|---|---|---|
@firebase/ai | TemplateRequest | interface |
Donnez ces données à votre agent IA
Vigia est un serveur MCP gratuit : votre agent de code vérifie les versions, les changements incompatibles et les vulnérabilités avant d'écrire du code. Sans inscription ni clé d'API.
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
Ajouter à CursorAjouter à VS Code★ Étoile sur GitHub
Tout autre client MCP
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }Skill pour agents (SKILL.md) : indique à l'agent quand utiliser Vigia · GitHub Action pour les pull requests
Questions fréquentes
Quels sont les changements incompatibles en passant de @firebase/ai 2 à 3 ?
Entre @firebase/ai 2.16.0 et 3.0.0, Vigia a trouvé 2 exports supprimés, 3 signatures modifiées et 61 membres de classes ou d’interfaces supprimés ou modifiés.
Qu’est-ce qui a été déprécié dans @firebase/ai 3 ?
11 exports ou membres sont désormais marqués comme dépréciés dans @firebase/ai 3.0.0.
Pour les agents
GET https://vigia.coredls.cloud/v1/packages/npm/@firebase/ai/upgrade?from=2.16.0&to=3.0.0