|
Klicken Sie auf Ihren Gemini API-Anbieter, um anbieterspezifische Inhalte und Code auf dieser Seite aufzurufen. |
Die generativen KI-Modelle von Google sind in bestimmten Regionen verfügbar. Sie können den Ort für den Zugriff auf das Modell so wählen, dass Ihre Anforderungen an Compliance, Latenz, Verfügbarkeit und Langlebigkeit erfüllt werden.
Wenn Sie Firebase AI Logic verwenden, kann jede Ihrer Anfragen, die Agent Platform Gemini API (formerly Vertex AI) verwenden, optional den Standort für den Zugriff auf das Modell enthalten. Firebase AI Logic hat standardmäßige Standorteinstellungen.
- Bei Verwendung der neuen Initialisierungssyntax für die Agent Platform:
global - Bei Verwendung der alten Initialisierungssyntax für „Vertex AI“:
us-central1
Informationen zum Standort global
Bei fast allen Gemini-Modellen bietet die Agent Platform Gemini API (formerly Vertex AI) einen global-Standort. Das bedeutet, dass Ihre Anfrage von einem verfügbaren Modell an einem beliebigen Ort im globalen Pool bearbeitet wird.
Wenn Sie den Standort global für Ihre Anfragen verwenden, können Sie Kapazitätsbeschränkungen für das Modell vermeiden und die Anzahl der Fehler vom Typ „Service overloaded“ (503) verringern.
Je nach Modell kann die Verwendung des Standorts global auch erforderlich sein, da dies der einzige verfügbare Standort für das Modell ist (z. B. ein Gemini-Vorschaumodell).
Wann muss ein Standort explizit festgelegt werden?
Für Firebase AI Logic gibt es automatische Standardeinstellungen für den Standort (z. B. global bei Verwendung der Initialisierungssyntax „Agent Platform“). Wenn Sie jedoch einen anderen Standort verwenden müssen oder möchten, müssen Sie den Standort beim Initialisieren des Agent Platform Gemini API (formerly Vertex AI)-Backend-Dienstes in Ihrem Code explizit angeben.
Je nach Modell ist es möglicherweise erforderlich, einen Standort explizit festzulegen.
Wenn in Ihrer Anfrage versucht wird, auf ein Modell an einem Standort zuzugreifen, an dem es nicht verfügbar ist, erhalten Sie den 404-Fehler, dass das Modell was not found or your project does not have access to it.
Gemini-Modelle in der Vorschau und experimentelle Modelle:Nur am Standort
globalverfügbar.Gemini 3.x Stabile Modelle:Verfügbar am Standort
globalund häufig auch an den Standortenusundeu.Gemini 2.5-Modelle:An vielen Standorten verfügbar. Gemini Live API 2.5-Modelle sind nicht in
globalverfügbar.
Eine Liste aller verfügbaren Standorte finden Sie weiter unten auf dieser Seite.
Allgemeine Fakten und Best Practices
Hier finden Sie einige wichtige Fakten und Best Practices zu Standorten:
Kapazitätslimits gelten pro Modell, pro Region und pro Minute.
Um unerwartete Kapazitätslimits zu vermeiden, sollten Sie den Standort
globalverwenden, sofern das Modellglobaldort verfügbar ist.Verwenden Sie Firebase Remote Config, um den Ort zu steuern, an dem Sie auf das Modell zugreifen. So können Sie den Standort ändern, ohne eine neue Version Ihrer App zu veröffentlichen.
Wenn die Verwendung des Standorts
globalfür Ihren Anwendungsfall nicht infrage kommt, sollten Sie explizit angeben, wo Sie auf ein Modell zugreifen (wenn das Modell an anderen Standorten alsglobalverfügbar ist). Sie können den Standort beispielsweise anhand des Standorts des Endnutzers mit Firebase Remote Config festlegen.
Codebeispiele
Firebase AI Logic hat automatische Standardeinstellungen für den Standort (z. B. global bei Verwendung der Initialisierungssyntax „Agent Platform“). Wenn Sie jedoch einen anderen Standort verwenden müssen oder möchten, müssen Sie den Standort beim Initialisieren des Agent Platform Gemini API (formerly Vertex AI)-Backend-Dienstes in Ihrem Code explizit angeben.
Ersetzen Sie LOCATION durch den Standortcode (z. B. global oder us-central1) aus der Liste der verfügbaren Standorte weiter unten auf dieser Seite.
Agent Platform-Syntax
Swift
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the `agentPlatform` syntax, the default location is `global`, so
// specifying a location is usually optional since most models are supported in `global`.
let ai = FirebaseAI.firebaseAI(backend: .agentPlatform(location: "LOCATION"))
// ...
Kotlin
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the `agentPlatform` syntax, the default location is `global`, so
// specifying a location is usually optional since most models are supported in `global`.
val ai = Firebase.ai(backend = GenerativeBackend.agentPlatform(location = "LOCATION"))
// ...
Java
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the `agentPlatform` syntax, the default location is `global`, so
// specifying a location is usually optional since most models are supported in `global`.
GenerativeModel ai = FirebaseAI.getInstance(GenerativeBackend.agentPlatform("LOCATION"));
// ...
Web
// ...
// Initialize FirebaseApp
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the `AgentPlatformBackend` syntax, the default location is `global`, so
// specifying a location is usually optional since most models are supported in `global`.
const ai = getAI(firebaseApp, { backend: new AgentPlatformBackend('LOCATION') });
// ...
Dart
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the `agentPlatform` syntax, the default location is `global`, so
// specifying a location is usually optional since most models are supported in `global`.
final ai = await FirebaseAI.agentPlatform(location: 'LOCATION');
// ...
Einheit
// ...
// Initialize the Agent Platform Gemini API backend service (formerly Vertex AI).
// For the `AgentPlatform` syntax, the default location is `global`, so
// specifying a location is usually optional since most models are supported in `global`.
var ai = FirebaseAI.GetInstance(FirebaseAI.Backend.AgentPlatform(location: "LOCATION"));
// ...
Vertex AI-Syntax
Swift
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the legacy `vertexai` syntax, the default location is `us-central`, so
// specifying a location is usually required since most models are *not* supported in `us-central`.
let ai = FirebaseAI.firebaseAI(backend: .vertexai(location: "LOCATION"))
// ...
Kotlin
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the legacy `vertexAI` syntax, the default location is `us-central`, so
// specifying a location is usually required since most models are *not* supported in `us-central`.
val ai = Firebase.ai(backend = GenerativeBackend.vertexAI(location = "LOCATION"))
// ...
Java
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the legacy `vertexAI` syntax, the default location is `us-central`, so
// specifying a location is usually required since most models are *not* supported in `us-central`.
GenerativeModel ai = FirebaseAI.getInstance(GenerativeBackend.vertexAI("LOCATION"));
// ...
Web
// ...
// Initialize FirebaseApp
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the legacy `VertexAIBackend` syntax, the default location is `us-central`, so
// specifying a location is usually required since most models are *not* supported in `us-central`.
const ai = getAI(firebaseApp, { backend: new VertexAIBackend('LOCATION') });
// ...
Dart
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the legacy `vertexAI` syntax, the default location is `us-central`, so
// specifying a location is usually required since most models are *not* supported in `us-central`.
final ai = await FirebaseAI.vertexAI(location: 'LOCATION');
// ...
Einheit
// ...
// Initialize the Agent Platform Gemini API backend service (formerly branded Vertex AI).
// For the legacy `VertexAI` syntax, the default location is `us-central`, so
// specifying a location is usually required since most models are *not* supported in `us-central`.
var ai = FirebaseAI.GetInstance(FirebaseAI.Backend.VertexAI(location: "LOCATION"));
// ...
Wenn Sie einen Standort angeben, an dem das Modell nicht verfügbar ist, erhalten Sie einen 404-Fehler mit der Meldung, dass das Modell was not found or your project does not have access to it.
Verfügbare Standorte
Google Cloud verwendet Regionen. Google Cloud speichert Kundendaten nur in der Region, die Sie für alle allgemein verfügbaren Funktionen von generativer KI in Agent Platform angeben.
Generative AI in Agent Platform ist in den folgenden Regionen verfügbar. Einige Modelle und/oder bestimmte Versionen sind möglicherweise nicht an allen Standorten verfügbar. (Genaue Informationen zur Verfügbarkeit an Standorten finden Sie in der Google Cloud-Dokumentation.)
Wichtige Hinweise:
Firebase AI Logic wird standardmäßig an den folgenden Speicherorten gespeichert:
- Bei Verwendung der neuen Initialisierungssyntax für die Agent Platform:
global - Bei Verwendung der alten Initialisierungssyntax für „Vertex AI“:
us-central1
- Bei Verwendung der neuen Initialisierungssyntax für die Agent Platform:
Gemini-Modelle in der Vorschau und experimentelle Modelle:Nur am Standort
globalverfügbar.Gemini 3.x Stabile Modelle:Verfügbar am Standort
globalund häufig auch an den Standortenusundeu.Gemini 2.5-Modelle:An vielen Standorten verfügbar. Gemini Live API 2.5-Modelle sind nicht in
globalverfügbar.
Gemini 3.x und neuere Modelle
Wenn Sie Gemini 3.x und spätere Modelle verwenden, unterstützt Firebase AI Logic die folgenden Standorte:
globaluseu
Details zu den verfügbaren Standorten für die einzelnen Modelle finden Sie in der Google Cloud-Dokumentation.
Modelle der älteren Generation
Bei der Verwendung älterer Gemini-Modelle (z. B. 2.5-Modelle) unterstützt Firebase AI Logic die folgenden Standorte:
Global
global
USA
- Columbus, Ohio (
us-east5) - Dallas, Texas (
us-south1) - Iowa (
us-central1) - Las Vegas, Nevada (
us-west4) - Moncks Corner, South Carolina (
us-east1) - Virginia (
us-east4) - Oregon (
us-west1)
Kanada
- Montreal (
northamerica-northeast1)
Südamerika
- Sao Paulo, Brasilien (
southamerica-east1)
Europa
- Belgien (
europe-west1) - Finnland (
europe-north1) - Frankfurt, Deutschland (
europe-west3) - London, Vereinigtes Königreich (
europe-west2) - Madrid, Spanien (
europe-southwest1) - Mailand, Italien (
europe-west8) - Niederlande (
europe-west4) - Paris, Frankreich (
europe-west9) - Warschau, Polen (
europe-central2) - Zürich, Schweiz (
europe-west6)
Asiatisch-pazifischer Raum
- Bezirk Changhua, Taiwan (
asia-east1) - Hongkong, China (
asia-east2) - Mumbai, Indien (
asia-south1) - Seoul, Korea (
asia-northeast3) - Singapur (
asia-southeast1) - Sydney, Australien (
australia-southeast1) - Tokio, Japan (
asia-northeast1)
Naher Osten
- Dammam, Saudi-Arabien (
me-central2) - Doha, Katar (
me-central1) - Tel Aviv, Israel (
me-west1)
Gemini Live API 2.5-Modelle sind nicht in global verfügbar.
Details zu den verfügbaren Standorten für die einzelnen Modelle finden Sie in der Google Cloud-Dokumentation.
Liste der zuvor verfügbaren, aber jetzt deaktivierten Standorte:
- Es wurden noch keine Standorte abgelehnt