remove gemini cli and antigravity support
This commit is contained in:
@@ -63,8 +63,6 @@ Unified LLM API with automatic model discovery, provider configuration, token an
|
||||
- **Vercel AI Gateway**
|
||||
- **MiniMax**
|
||||
- **GitHub Copilot** (requires OAuth, see below)
|
||||
- **Google Gemini CLI** (requires OAuth, see below)
|
||||
- **Antigravity** (requires OAuth, see below)
|
||||
- **Amazon Bedrock**
|
||||
- **OpenCode Zen**
|
||||
- **OpenCode Go**
|
||||
@@ -630,7 +628,6 @@ The library uses a registry of API implementations. Built-in APIs include:
|
||||
|
||||
- **`anthropic-messages`**: Anthropic Messages API (`streamAnthropic`, `AnthropicOptions`)
|
||||
- **`google-generative-ai`**: Google Generative AI API (`streamGoogle`, `GoogleOptions`)
|
||||
- **`google-gemini-cli`**: Google Cloud Code Assist API (`streamGoogleGeminiCli`, `GoogleGeminiCliOptions`)
|
||||
- **`google-vertex`**: Google Vertex AI API (`streamGoogleVertex`, `GoogleVertexOptions`)
|
||||
- **`mistral-conversations`**: Mistral Conversations API (`streamMistral`, `MistralOptions`)
|
||||
- **`openai-completions`**: OpenAI Chat Completions API (`streamOpenAICompletions`, `OpenAICompletionsOptions`)
|
||||
@@ -1053,27 +1050,6 @@ const response = await complete(model, context, {
|
||||
});
|
||||
```
|
||||
|
||||
#### Antigravity Version Override
|
||||
|
||||
Set `PI_AI_ANTIGRAVITY_VERSION` to override the Antigravity User-Agent version when Google updates their requirements:
|
||||
|
||||
```bash
|
||||
export PI_AI_ANTIGRAVITY_VERSION="1.23.0"
|
||||
```
|
||||
|
||||
#### Cache Retention
|
||||
|
||||
Set `PI_CACHE_RETENTION=long` to extend prompt cache retention:
|
||||
|
||||
| Provider | Default | With `PI_CACHE_RETENTION=long` |
|
||||
|----------|---------|-------------------------------|
|
||||
| Anthropic | 5 minutes | 1 hour |
|
||||
| OpenAI | in-memory | 24 hours |
|
||||
|
||||
This only affects direct API calls to `api.anthropic.com` and `api.openai.com`. Proxies and other providers are unaffected.
|
||||
|
||||
> **Note**: Extended cache retention may increase costs for Anthropic (cache writes are charged at a higher rate). OpenAI's 24h retention has no additional cost.
|
||||
|
||||
### Checking Environment Variables
|
||||
|
||||
```typescript
|
||||
@@ -1090,8 +1066,6 @@ Several providers require OAuth authentication instead of static API keys:
|
||||
- **Anthropic** (Claude Pro/Max subscription)
|
||||
- **OpenAI Codex** (ChatGPT Plus/Pro subscription, access to GPT-5.x Codex models)
|
||||
- **GitHub Copilot** (Copilot subscription)
|
||||
- **Google Gemini CLI** (Gemini 2.0/2.5 via Google Cloud Code Assist; free tier or paid subscription)
|
||||
- **Antigravity** (Free Gemini 3, Claude, GPT-OSS via Google Cloud)
|
||||
|
||||
For paid Cloud Code Assist subscriptions, set `GOOGLE_CLOUD_PROJECT` or `GOOGLE_CLOUD_PROJECT_ID` to your project ID.
|
||||
|
||||
@@ -1159,14 +1133,13 @@ import {
|
||||
loginOpenAICodex,
|
||||
loginGitHubCopilot,
|
||||
loginGeminiCli,
|
||||
loginAntigravity,
|
||||
|
||||
// Token management
|
||||
refreshOAuthToken, // (provider, credentials) => new credentials
|
||||
getOAuthApiKey, // (provider, credentialsMap) => { newCredentials, apiKey } | null
|
||||
|
||||
// Types
|
||||
type OAuthProvider, // 'anthropic' | 'openai-codex' | 'github-copilot' | 'google-gemini-cli' | 'google-antigravity'
|
||||
type OAuthProvider,
|
||||
type OAuthCredentials,
|
||||
} from '@mariozechner/pi-ai/oauth';
|
||||
```
|
||||
@@ -1228,8 +1201,6 @@ const response = await complete(model, {
|
||||
|
||||
**GitHub Copilot**: If you get "The requested model is not supported" error, enable the model manually in VS Code: open Copilot Chat, click the model selector, select the model (warning icon), and click "Enable".
|
||||
|
||||
**Google Gemini CLI / Antigravity**: These use Google Cloud OAuth. The `apiKey` returned by `getOAuthApiKey()` is a JSON string containing both the token and project ID, which the library handles automatically.
|
||||
|
||||
## Development
|
||||
|
||||
### Adding a New Provider
|
||||
|
||||
Reference in New Issue
Block a user