mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 19:02:10 +00:00
Add Vertex AI provider with ADC support
- Implement google-vertex provider in packages/ai - Support ADC (Application Default Credentials) via @google/generative-ai - Add Gemini model catalog for Vertex AI - Update packages/coding-agent to handle google-vertex provider
This commit is contained in:
parent
d747ec6e23
commit
214e7dae15
11 changed files with 788 additions and 4 deletions
|
|
@ -9,6 +9,7 @@ Unified LLM API with automatic model discovery, provider configuration, token an
|
|||
- **OpenAI**
|
||||
- **Anthropic**
|
||||
- **Google**
|
||||
- **Vertex AI** (Gemini via Vertex AI)
|
||||
- **Mistral**
|
||||
- **Groq**
|
||||
- **Cerebras**
|
||||
|
|
@ -848,6 +849,10 @@ Several providers require OAuth authentication instead of static API keys:
|
|||
- **Google Gemini CLI** (Free Gemini 2.0/2.5 via Google Cloud Code Assist)
|
||||
- **Antigravity** (Free Gemini 3, Claude, GPT-OSS via Google Cloud)
|
||||
|
||||
### Vertex AI (ADC)
|
||||
|
||||
Vertex AI models use Application Default Credentials. Run `gcloud auth application-default login`, set `GOOGLE_CLOUD_PROJECT` (or `GCLOUD_PROJECT`), and `GOOGLE_CLOUD_LOCATION`. You can also pass `project`/`location` in the call options.
|
||||
|
||||
### CLI Login
|
||||
|
||||
The quickest way to authenticate:
|
||||
|
|
@ -871,11 +876,11 @@ import {
|
|||
loginGitHubCopilot,
|
||||
loginGeminiCli,
|
||||
loginAntigravity,
|
||||
|
||||
|
||||
// Token management
|
||||
refreshOAuthToken, // (provider, credentials) => new credentials
|
||||
getOAuthApiKey, // (provider, credentialsMap) => { newCredentials, apiKey } | null
|
||||
|
||||
|
||||
// Types
|
||||
type OAuthProvider, // 'anthropic' | 'github-copilot' | 'google-gemini-cli' | 'google-antigravity'
|
||||
type OAuthCredentials,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue