@gullabs/any-llm 0.10.0 → 0.11.0
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/LICENSE +84 -73
- package/README.md +8 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/skills/any-llm/SKILL.md +22 -15
package/LICENSE
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
Apache License
|
|
2
3
|
Version 2.0, January 2004
|
|
3
4
|
http://www.apache.org/licenses/
|
|
@@ -32,33 +33,36 @@
|
|
|
32
33
|
not limited to compiled object code, generated documentation,
|
|
33
34
|
and conversions to other media types.
|
|
34
35
|
|
|
35
|
-
"Work" shall mean the work of authorship
|
|
36
|
-
the License, as indicated by a
|
|
37
|
-
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
38
40
|
|
|
39
41
|
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
42
|
form, that is based on (or derived from) the Work and for which the
|
|
41
|
-
editorial revisions, annotations, elaborations, or other
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"Contribution" shall mean
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
or
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
62
66
|
|
|
63
67
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
64
68
|
this License, each Contributor hereby grants to You a perpetual,
|
|
@@ -74,22 +78,22 @@
|
|
|
74
78
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
75
79
|
where such license applies only to those patent claims licensable
|
|
76
80
|
by such Contributor that are necessarily infringed by their
|
|
77
|
-
Contribution(s) alone or by
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
78
82
|
with the Work to which such Contribution(s) was submitted. If You
|
|
79
|
-
institute patent litigation against any entity (including a
|
|
80
|
-
or counterclaim in a lawsuit) alleging that the Work
|
|
81
|
-
|
|
82
|
-
infringement, then any patent licenses
|
|
83
|
-
License for that Work shall terminate
|
|
84
|
-
is filed.
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
85
89
|
|
|
86
90
|
4. Redistribution. You may reproduce and distribute copies of the
|
|
87
91
|
Work or Derivative Works thereof in any medium, with or without
|
|
88
92
|
modifications, and in Source or Object form, provided that You
|
|
89
93
|
meet the following conditions:
|
|
90
94
|
|
|
91
|
-
(a) You must give any other recipients of the Work or
|
|
92
|
-
Works a copy of this License; and
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
93
97
|
|
|
94
98
|
(b) You must cause any modified files to carry prominent notices
|
|
95
99
|
stating that You changed the files; and
|
|
@@ -101,25 +105,28 @@
|
|
|
101
105
|
the Derivative Works; and
|
|
102
106
|
|
|
103
107
|
(d) If the Work includes a "NOTICE" text file as part of its
|
|
104
|
-
distribution,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
the
|
|
109
|
-
Derivative Works;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
may
|
|
121
|
-
|
|
122
|
-
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
123
130
|
|
|
124
131
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
125
132
|
any Contribution intentionally submitted for inclusion in the Work
|
|
@@ -141,7 +148,7 @@
|
|
|
141
148
|
implied, including, without limitation, any warranties or conditions
|
|
142
149
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
143
150
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
144
|
-
appropriateness of using or
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
145
152
|
risks associated with Your exercise of permissions under this License.
|
|
146
153
|
|
|
147
154
|
8. Limitation of Liability. In no event and under no legal theory,
|
|
@@ -149,21 +156,23 @@
|
|
|
149
156
|
unless required by applicable law (such as deliberate and grossly
|
|
150
157
|
negligent acts) or agreed to in writing, shall any Contributor be
|
|
151
158
|
liable to You for damages, including any direct, indirect, special,
|
|
152
|
-
incidental, or
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
153
160
|
result of this License or out of the use or inability to use the
|
|
154
161
|
Work (including but not limited to damages for loss of goodwill,
|
|
155
|
-
work stoppage, computer failure or malfunction, or all
|
|
156
|
-
commercial damages or losses), even if such Contributor
|
|
157
|
-
advised of the possibility of such damages.
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
158
165
|
|
|
159
166
|
9. Accepting Warranty or Additional Liability. While redistributing
|
|
160
167
|
the Work or Derivative Works thereof, You may choose to offer,
|
|
161
168
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
162
169
|
or other liability obligations and/or rights consistent with this
|
|
163
|
-
License. However, in accepting such obligations, You may
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
167
176
|
|
|
168
177
|
END OF TERMS AND CONDITIONS
|
|
169
178
|
|
|
@@ -173,19 +182,21 @@
|
|
|
173
182
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
174
183
|
replaced with your own identifying information. (Don't include
|
|
175
184
|
the brackets!) The text should be enclosed in the appropriate
|
|
176
|
-
comment syntax for the file format
|
|
177
|
-
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
178
189
|
|
|
179
|
-
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
180
191
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
184
195
|
|
|
185
|
-
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
197
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ const result = await client.runStructured(
|
|
|
52
52
|
{ auth: { apiKey: process.env.GEMINI_API_KEY! } },
|
|
53
53
|
)
|
|
54
54
|
|
|
55
|
-
const descriptor = defaultGeminiRegistry.resolve('google', 'gemini-3.
|
|
55
|
+
const descriptor = defaultGeminiRegistry.resolve('google', 'gemini-3.6-flash')
|
|
56
56
|
if (!descriptor) throw new Error('unknown model')
|
|
57
57
|
|
|
58
58
|
const parsedConfig = descriptor.configSchema.parse({
|
|
@@ -67,6 +67,13 @@ Built-in descriptors own the strict model-config contract:
|
|
|
67
67
|
provider's standard tier, and set `flex` explicitly when that trade-off is
|
|
68
68
|
intended. `priority` remains rejected by the library for now.
|
|
69
69
|
|
|
70
|
+
Registered Google ids: `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.5-flash-lite`,
|
|
71
|
+
`gemini-3.1-pro-preview`, `gemini-3.1-flash-lite`, `gemini-3.5-flash-lite`,
|
|
72
|
+
`gemini-3.6-flash`, `gemini-3.7-flash`, `gemini-3.8-flash`, `gemma-4-31b-it`,
|
|
73
|
+
`gemma-4-26b-a4b-it`. `gemini-3.1-pro-preview`, `gemini-3.7-flash`, and
|
|
74
|
+
`gemini-3.8-flash` do not admit `effort: 'none'`. `gemini-3-flash-preview` and
|
|
75
|
+
`gemini-3.5-flash` do not resolve.
|
|
76
|
+
|
|
70
77
|
## Key exports
|
|
71
78
|
|
|
72
79
|
This package re-exports the full public API of `@gullabs/core` and `@gullabs/google` verbatim —
|
package/dist/index.cjs
CHANGED
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";;;;;;;;AAEE,IAAA,OAAA,GAAW,QAAA;;;ACcN,IAAM,eAAA,GAA0B","file":"index.cjs","sourcesContent":["{\n \"name\": \"@gullabs/any-llm\",\n \"version\": \"0.
|
|
1
|
+
{"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";;;;;;;;AAEE,IAAA,OAAA,GAAW,QAAA;;;ACcN,IAAM,eAAA,GAA0B","file":"index.cjs","sourcesContent":["{\n \"name\": \"@gullabs/any-llm\",\n \"version\": \"0.11.0\",\n \"description\": \"Batteries-included any-llm client for Gemini: engine, adapter, and Google SDK in one install.\",\n \"type\": \"module\",\n \"license\": \"Apache-2.0\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/gul-labs/any-llm.git\",\n \"directory\": \"packages/any-llm\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n }\n },\n \"files\": [\n \"dist\",\n \"skills\"\n ],\n \"scripts\": {\n \"build\": \"tsup\"\n },\n \"dependencies\": {\n \"@google/genai\": \"^2.23.0\",\n \"@gullabs/core\": \"workspace:*\",\n \"@gullabs/google\": \"workspace:*\"\n },\n \"engines\": {\n \"node\": \">=22.12.0\"\n },\n \"sideEffects\": false,\n \"keywords\": [\n \"llm\",\n \"gemini\",\n \"google-genai\",\n \"ai\",\n \"tokens\",\n \"cost\",\n \"usage\",\n \"observability\",\n \"typescript\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"homepage\": \"https://github.com/gul-labs/any-llm/tree/main/packages/any-llm#readme\",\n \"bugs\": \"https://github.com/gul-labs/any-llm/issues\"\n}\n","/**\n * @gullabs/any-llm — batteries-included public entrypoint.\n *\n * This package is the default client install path. It re-exports the core\n * engine and Gemini adapter while depending on the Gemini SDK for a one-package\n * setup.\n *\n * @module\n */\n\nexport * from '@gullabs/core'\nexport * from '@gullabs/google'\n\nimport { version } from '../package.json'\n\n/** Library version, sourced from package.json at build time. */\nexport const ANY_LLM_VERSION: string = version\n"]}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";;;;;;AAEE,IAAA,OAAA,GAAW,QAAA;;;ACcN,IAAM,eAAA,GAA0B","file":"index.js","sourcesContent":["{\n \"name\": \"@gullabs/any-llm\",\n \"version\": \"0.
|
|
1
|
+
{"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";;;;;;AAEE,IAAA,OAAA,GAAW,QAAA;;;ACcN,IAAM,eAAA,GAA0B","file":"index.js","sourcesContent":["{\n \"name\": \"@gullabs/any-llm\",\n \"version\": \"0.11.0\",\n \"description\": \"Batteries-included any-llm client for Gemini: engine, adapter, and Google SDK in one install.\",\n \"type\": \"module\",\n \"license\": \"Apache-2.0\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/gul-labs/any-llm.git\",\n \"directory\": \"packages/any-llm\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n }\n },\n \"files\": [\n \"dist\",\n \"skills\"\n ],\n \"scripts\": {\n \"build\": \"tsup\"\n },\n \"dependencies\": {\n \"@google/genai\": \"^2.23.0\",\n \"@gullabs/core\": \"workspace:*\",\n \"@gullabs/google\": \"workspace:*\"\n },\n \"engines\": {\n \"node\": \">=22.12.0\"\n },\n \"sideEffects\": false,\n \"keywords\": [\n \"llm\",\n \"gemini\",\n \"google-genai\",\n \"ai\",\n \"tokens\",\n \"cost\",\n \"usage\",\n \"observability\",\n \"typescript\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"homepage\": \"https://github.com/gul-labs/any-llm/tree/main/packages/any-llm#readme\",\n \"bugs\": \"https://github.com/gul-labs/any-llm/issues\"\n}\n","/**\n * @gullabs/any-llm — batteries-included public entrypoint.\n *\n * This package is the default client install path. It re-exports the core\n * engine and Gemini adapter while depending on the Gemini SDK for a one-package\n * setup.\n *\n * @module\n */\n\nexport * from '@gullabs/core'\nexport * from '@gullabs/google'\n\nimport { version } from '../package.json'\n\n/** Library version, sourced from package.json at build time. */\nexport const ANY_LLM_VERSION: string = version\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gullabs/any-llm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Batteries-included any-llm client for Gemini: engine, adapter, and Google SDK in one install.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"skills"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@google/genai": "^2.
|
|
28
|
-
"@gullabs/core": "0.
|
|
29
|
-
"@gullabs/google": "0.
|
|
27
|
+
"@google/genai": "^2.23.0",
|
|
28
|
+
"@gullabs/core": "0.15.0",
|
|
29
|
+
"@gullabs/google": "0.13.0"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": ">=22.12.0"
|
package/skills/any-llm/SKILL.md
CHANGED
|
@@ -158,11 +158,9 @@ const result = await client.generate(
|
|
|
158
158
|
)
|
|
159
159
|
```
|
|
160
160
|
|
|
161
|
-
`grok-4.5`
|
|
162
|
-
`grok-4.6`
|
|
163
|
-
`'
|
|
164
|
-
price, confirmed by live `cost_in_usd_ticks`). `grok-4.5` still rejects every
|
|
165
|
-
`serviceTier`. No `topK`.
|
|
161
|
+
`grok-4.5` admits `reasoning.effort` `'low' | 'medium' | 'high'`.
|
|
162
|
+
`grok-4.6` and `grok-4.7` also admit `'xhigh'`. All three admit
|
|
163
|
+
`serviceTier: 'priority'` (2× list price). `'none'` is rejected. No `topK`.
|
|
166
164
|
|
|
167
165
|
## xAI structured-output schemas vs. OpenAI-strict / codex-cli schemas
|
|
168
166
|
|
|
@@ -367,7 +365,7 @@ Treat model config as descriptor-owned:
|
|
|
367
365
|
```ts
|
|
368
366
|
import { defaultGeminiRegistry } from '@gullabs/google'
|
|
369
367
|
|
|
370
|
-
const descriptor = defaultGeminiRegistry.resolve('google', 'gemini-3.
|
|
368
|
+
const descriptor = defaultGeminiRegistry.resolve('google', 'gemini-3.6-flash')
|
|
371
369
|
if (!descriptor) throw new Error('unknown model')
|
|
372
370
|
|
|
373
371
|
// UI/forms:
|
|
@@ -538,23 +536,32 @@ config: {
|
|
|
538
536
|
}
|
|
539
537
|
```
|
|
540
538
|
|
|
541
|
-
`ReasoningEffort` is `'none' | 'low' | 'medium' | 'high' | 'xhigh'`. Admitted values
|
|
539
|
+
`ReasoningEffort` is `'none' | 'low' | 'medium' | 'high' | 'xhigh' | 'max'`. Admitted values
|
|
542
540
|
are per-model. Two provider APIs exist under the hood: Gemini 2.5 models take a
|
|
543
541
|
token `budgetTokens`; Gemini 3.x / Gemma 4 / xAI take a discrete `effort` level.
|
|
544
542
|
|
|
545
543
|
Use the model-native boundary directly:
|
|
546
544
|
|
|
547
|
-
- Gemini 2.5: `reasoning.budgetTokens` or admitted `reasoning.effort` (not `xhigh`)
|
|
548
|
-
- Gemini 3 / Gemma 4: `reasoning.effort` (not `xhigh`)
|
|
549
|
-
- xAI `grok-4.5`: `reasoning.effort` `'low' | 'high'`
|
|
550
|
-
- xAI `grok-4.6`: `reasoning.effort` `'low' | 'medium' | 'high' | 'xhigh'`
|
|
545
|
+
- Gemini 2.5: `reasoning.budgetTokens` or admitted `reasoning.effort` (not `xhigh` or `max`)
|
|
546
|
+
- Gemini 3 / Gemma 4: `reasoning.effort` (not `xhigh` or `max`)
|
|
547
|
+
- xAI `grok-4.5`: `reasoning.effort` `'low' | 'medium' | 'high'`
|
|
548
|
+
- xAI `grok-4.6` and `grok-4.7`: `reasoning.effort` `'low' | 'medium' | 'high' | 'xhigh'`
|
|
549
|
+
|
|
550
|
+
Registered Google ids: `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.5-flash-lite`,
|
|
551
|
+
`gemini-3.1-pro-preview`, `gemini-3.1-flash-lite`, `gemini-3.5-flash-lite`,
|
|
552
|
+
`gemini-3.6-flash`, `gemini-3.7-flash`, `gemini-3.8-flash`, `gemma-4-31b-it`,
|
|
553
|
+
`gemma-4-26b-a4b-it`. `gemini-3-flash-preview` and `gemini-3.5-flash` do not resolve.
|
|
551
554
|
|
|
552
555
|
Exact model reminders:
|
|
553
556
|
|
|
554
|
-
- `gemini-3.1-pro-preview`
|
|
557
|
+
- `gemini-3.1-pro-preview`, `gemini-3.7-flash`, and `gemini-3.8-flash` do **not** admit `effort: 'none'`
|
|
558
|
+
- Explicit-cache floors: 1024 on all six registered Gemini 3.x ids, live-verified on 2026-09-26 by a 103-token rejection and exact 1024-token create; 2048 remains configured on Gemini 2.5.
|
|
555
559
|
- Gemma 4 is binary: only `effort: 'none'` or `effort: 'high'`
|
|
556
560
|
- Omit `serviceTier` for provider-standard; set `flex` explicitly
|
|
557
561
|
- `priority` remains rejected by the library even though Google documents it
|
|
562
|
+
- July 21, 2026: Google deprecated sampling parameters `temperature`, `top_p`, and `top_k`. Gemini 3.x schemas already omit them. Gemini 2.5 and Gemma stay tunable.
|
|
563
|
+
- September 18, 2026: Gemini 2.5 access is restricted to projects that already used 2.5. The three 2.5 ids stay registered.
|
|
564
|
+
- xAI long-context rates apply at gross input `>= 200_000` (`long_context_threshold` is inclusive).
|
|
558
565
|
|
|
559
566
|
## Context caching — `GoogleCacheStore`
|
|
560
567
|
|
|
@@ -568,8 +575,8 @@ Optional preflight gate: pass `preflight` to the constructor to refuse a cache
|
|
|
568
575
|
`create()` — including through `getOrCreate()` and its coalesced in-flight path —
|
|
569
576
|
when the token-bearing payload (`model` + `contents` + `systemInstruction` only;
|
|
570
577
|
`ttl` and `displayName` are excluded) doesn't clear a minimum token count. This
|
|
571
|
-
mirrors
|
|
572
|
-
hard-coding it into the store.
|
|
578
|
+
mirrors the selected model's explicit-caching minimum (1024 on Gemini 3.x;
|
|
579
|
+
2048 on Gemini 2.5) without hard-coding it into the store.
|
|
573
580
|
|
|
574
581
|
```ts
|
|
575
582
|
import { GoogleCacheStore } from '@gullabs/google'
|
|
@@ -577,7 +584,7 @@ import { GoogleCacheStore } from '@gullabs/google'
|
|
|
577
584
|
const cacheStore = new GoogleCacheStore({
|
|
578
585
|
auth: { apiKey: myResolvedGeminiKey },
|
|
579
586
|
preflight: {
|
|
580
|
-
minTokens:
|
|
587
|
+
minTokens: 1024,
|
|
581
588
|
// Receives genai-native Content[]/Content|string — NOT the library's
|
|
582
589
|
// Message[] shape; there is no automatic conversion. Hosts building from
|
|
583
590
|
// Message[] should call client.countTokens separately instead.
|