@llm-ports/adapter-google 0.1.0-alpha.7 → 0.1.0-alpha.8

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.
Files changed (2) hide show
  1. package/README.md +23 -12
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -8,7 +8,7 @@ Native Google Gemini adapter for [`llm-ports`](https://github.com/baabakk/llm-po
8
8
  pnpm add @llm-ports/core @llm-ports/adapter-google @google/genai zod
9
9
  ```
10
10
 
11
- ## Usage
11
+ ## Configure
12
12
 
13
13
  ```ts
14
14
  import { createRegistryFromEnv } from "@llm-ports/core";
@@ -62,6 +62,17 @@ Gemini exposes an OpenAI-compatible surface at `https://generativelanguage.googl
62
62
  | Explicit context caching | ✗ — v0.2 |
63
63
  | Code execution tool | ✗ — v0.2 |
64
64
 
65
+ ## Adapter options
66
+
67
+ ```ts
68
+ interface GoogleAdapterOptions {
69
+ apiKey: string;
70
+ pricingOverrides?: Record<string, ModelPricing>;
71
+ validationStrategy?: ValidationStrategy;
72
+ imageSizeLimitBytes?: number; // default 20 MB
73
+ }
74
+ ```
75
+
65
76
  ## Bundled pricing
66
77
 
67
78
  | Model | Input/1M | Output/1M | Cached input/1M |
@@ -74,17 +85,17 @@ Gemini exposes an OpenAI-compatible surface at `https://generativelanguage.googl
74
85
 
75
86
  Pricing source: <https://ai.google.dev/gemini-api/docs/pricing> (verified 2026-05). Bundled values are the under-200k-token tier. For long-context workloads, supply `pricingOverrides` with the over-200k rates.
76
87
 
77
- ## Adapter options
88
+ ## Content blocks supported
78
89
 
79
- ```ts
80
- interface GoogleAdapterOptions {
81
- apiKey: string;
82
- pricingOverrides?: Record<string, ModelPricing>;
83
- validationStrategy?: ValidationStrategy;
84
- imageSizeLimitBytes?: number; // default 20 MB
85
- }
86
- ```
90
+ `text`, `image` (base64 → inlineData; URL → fileData), `audio` (base64 only — Gemini accepts inlineData for audio), `tool_use`, `tool_result`. Throws `ContentBlockUnsupportedError` for URL-form audio.
91
+
92
+ ## Cancellation
93
+
94
+ Full `AbortSignal` support shipped in `0.1.0-alpha.6`. The signal is threaded into the `config` arg of `client.models.generateContent`, so `controller.abort()` cancels the in-flight HTTP request. `runAgent` also re-checks the signal between steps. See the [Cancellation guide](https://baabakk.github.io/llm-ports/guides/cancellation).
87
95
 
88
- ## License
96
+ ## Reading next
89
97
 
90
- MIT
98
+ - [Google adapter docs](https://baabakk.github.io/llm-ports/adapters/google) — full feature deep-dive
99
+ - [OpenAI adapter](https://baabakk.github.io/llm-ports/adapters/openai) — comparison when choosing between native Gemini and OpenAI-compat path
100
+ - [Multi-provider routing](https://baabakk.github.io/llm-ports/guides/multi-provider) — chain Gemini with Anthropic / OpenAI fallbacks
101
+ - [@google/genai SDK docs](https://github.com/googleapis/js-genai) — underlying SDK reference
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llm-ports/adapter-google",
3
- "version": "0.1.0-alpha.7",
3
+ "version": "0.1.0-alpha.8",
4
4
  "description": "Google Gemini adapter for llm-ports — native @google/genai SDK integration with bundled pricing, content-block translation, validation repair, and image-size + URL validation.",
5
5
  "license": "MIT",
6
6
  "author": "Babak Abbaschian",