@gullabs/google 0.5.0 → 0.5.1
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 +18 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Gemini provider adapter for any-llm. A thin mapping layer over `@google/genai` that converts `ResolvedRequest` → Gemini SDK params and maps the response back to `AdapterResult`. Never persists, never computes cost, never loops — pure request/response.
|
|
4
4
|
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @gullabs/google @gullabs/core @google/genai
|
|
9
|
+
```
|
|
10
|
+
|
|
5
11
|
**Peer dependency:** `@google/genai ^1 || ^2`
|
|
6
12
|
|
|
7
13
|
## Key exports
|
|
@@ -25,7 +31,7 @@ const client = createClient({
|
|
|
25
31
|
pricing: geminiPricingSource(),
|
|
26
32
|
})
|
|
27
33
|
|
|
28
|
-
// Auth is required
|
|
34
|
+
// Auth is required per call — the library never reads environment variables.
|
|
29
35
|
const result = await client.generate(
|
|
30
36
|
{
|
|
31
37
|
model: 'gemini-2.5-flash',
|
|
@@ -62,5 +68,16 @@ and `gemma-4-26b-a4b-it`. Both route through this adapter and support:
|
|
|
62
68
|
(rejected by the API with HTTP 400).
|
|
63
69
|
- **Tunable sampling** — `temperature`, `topP`, `topK` are accepted.
|
|
64
70
|
|
|
71
|
+
This follows the library-wide **reject, don't map** rule: unsupported or incorrect input throws a
|
|
72
|
+
typed `bad_request` `LlmError` at validation time rather than being silently clamped or coerced
|
|
73
|
+
into something the model happens to accept.
|
|
74
|
+
|
|
65
75
|
Gemma 4 models do **not** support Gemini Flex service tier (`serviceTiers` is absent from their
|
|
66
76
|
descriptors) and are unpriced (`cost.microUsd` will be `null`).
|
|
77
|
+
|
|
78
|
+
## Learn more
|
|
79
|
+
|
|
80
|
+
- [Monorepo root README](../../README.md) — full architecture, auth model, and package overview
|
|
81
|
+
- [`docs/grounded-structured.md`](../../docs/grounded-structured.md) — the recommended two-call Gemini grounding → structured-output recipe
|
|
82
|
+
- [`docs/multi-runtime.md`](../../docs/multi-runtime.md) — web route + Temporal worker integration pattern, auth, metadata, and retry ownership
|
|
83
|
+
- [`@gullabs/core` README](../core/README.md) — engine, ports, and the `LlmError` contract
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gullabs/google",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Gemini provider adapter for any-llm — Flex tier, thinking capture, structured output, error classification.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@gullabs/core": "0.4.
|
|
26
|
+
"@gullabs/core": "0.4.2"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@google/genai": "^1 || ^2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@google/genai": "^1.45.0",
|
|
33
|
-
"@gullabs/testing": "0.2.
|
|
33
|
+
"@gullabs/testing": "0.2.2"
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=20.9.0"
|