@mariozechner/pi-ai 0.42.1 → 0.42.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -892,12 +892,48 @@ Several providers require OAuth authentication instead of static API keys:
892
892
  - **Anthropic** (Claude Pro/Max subscription)
893
893
  - **OpenAI Codex** (ChatGPT Plus/Pro subscription, access to GPT-5.x Codex models)
894
894
  - **GitHub Copilot** (Copilot subscription)
895
- - **Google Gemini CLI** (Free Gemini 2.0/2.5 via Google Cloud Code Assist)
895
+ - **Google Gemini CLI** (Gemini 2.0/2.5 via Google Cloud Code Assist; free tier or paid subscription)
896
896
  - **Antigravity** (Free Gemini 3, Claude, GPT-OSS via Google Cloud)
897
897
 
898
+ For paid Cloud Code Assist subscriptions, set `GOOGLE_CLOUD_PROJECT` or `GOOGLE_CLOUD_PROJECT_ID` to your project ID.
899
+
898
900
  ### Vertex AI (ADC)
899
901
 
900
- 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.
902
+ Vertex AI models use Application Default Credentials (ADC):
903
+
904
+ - **Local development**: Run `gcloud auth application-default login`
905
+ - **CI/Production**: Set `GOOGLE_APPLICATION_CREDENTIALS` to point to a service account JSON key file
906
+
907
+ Also set `GOOGLE_CLOUD_PROJECT` (or `GCLOUD_PROJECT`) and `GOOGLE_CLOUD_LOCATION`. You can also pass `project`/`location` in the call options.
908
+
909
+ Example:
910
+
911
+ ```bash
912
+ # Local (uses your user credentials)
913
+ gcloud auth application-default login
914
+ export GOOGLE_CLOUD_PROJECT="my-project"
915
+ export GOOGLE_CLOUD_LOCATION="us-central1"
916
+
917
+ # CI/Production (service account key file)
918
+ export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
919
+ ```
920
+
921
+ ```typescript
922
+ import { getModel, complete } from '@mariozechner/pi-ai';
923
+
924
+ (async () => {
925
+ const model = getModel('google-vertex', 'gemini-2.5-flash');
926
+ const response = await complete(model, {
927
+ messages: [{ role: 'user', content: 'Hello from Vertex AI' }]
928
+ });
929
+
930
+ for (const block of response.content) {
931
+ if (block.type === 'text') console.log(block.text);
932
+ }
933
+ })().catch(console.error);
934
+ ```
935
+
936
+ Official docs: [Application Default Credentials](https://cloud.google.com/docs/authentication/application-default-credentials)
901
937
 
902
938
  ### CLI Login
903
939