@gullabs/google 0.9.1 → 0.10.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 +3 -5
- package/dist/index.cjs +12 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -22,10 +22,8 @@ pnpm add @gullabs/google @gullabs/core @google/genai
|
|
|
22
22
|
| `isGeminiCapacityError(err)` | Detects Gemini Flex shared-capacity errors for built-in fallback |
|
|
23
23
|
| `geminiModelDescriptors`, `gemmaModelDescriptors`, `defaultGeminiRegistry` | Built-in model descriptors + pre-built registry |
|
|
24
24
|
| `geminiPricingSource()`, `GEMINI_PRICING`, `TIER_FACTOR` | Built-in Gemini pricing snapshot and tier-factor map |
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
| `GoogleFileStore` | Files API: upload + poll ACTIVE + delete |
|
|
28
|
-
| `FileDeleteOptions` | `{ failClosed?, signal? }` — opt-in fail-closed delete (parity with `@gullabs/xai`) |
|
|
25
|
+
| `GoogleFileStore` | Files API: upload + poll ACTIVE + delete |
|
|
26
|
+
| `FileDeleteOptions` | `{ failClosed?, signal? }` — opt-in fail-closed delete (parity with `@gullabs/xai`) |
|
|
29
27
|
|
|
30
28
|
## File store delete modes
|
|
31
29
|
|
|
@@ -67,7 +65,7 @@ const result = await client.generate(
|
|
|
67
65
|
- `output.jsonSchema` → `responseMimeType: 'application/json'` + verbatim `responseSchema` when native structured output is enabled; the engine returns parsed output and `outputParsed` without validating shape
|
|
68
66
|
- `providerOptions.google.*` → typed provider-extension lane for admitted keys such as `cachedContent`, `safetySettings`, and exact tool declarations
|
|
69
67
|
- Usage: `promptTokenCount`→`inputTokens`, `candidatesTokenCount`+`thoughtsTokenCount`→`outputTokens` (GROSS)
|
|
70
|
-
- Errors: `401
|
|
68
|
+
- Errors: `401` and a bare `403` default to `invalid_auth`; `429`→`rate_limited`; `5xx`→`server`; timeouts; Gemini safety blocks are a 200-path `content_filter` (`promptFeedback.blockReason` / no candidates), not an HTTP 403
|
|
71
69
|
|
|
72
70
|
## Strict model-config expectations
|
|
73
71
|
|
package/dist/index.cjs
CHANGED
|
@@ -480,6 +480,12 @@ function geminiAdapter(opts) {
|
|
|
480
480
|
);
|
|
481
481
|
}
|
|
482
482
|
if (reasoningApi === "budget") {
|
|
483
|
+
if (reasoning.effort === "xhigh") {
|
|
484
|
+
throw new core.LlmError(
|
|
485
|
+
`reasoning.effort "xhigh" is not supported for model "${model}".`,
|
|
486
|
+
{ kind: "bad_request", retryable: false }
|
|
487
|
+
);
|
|
488
|
+
}
|
|
483
489
|
const budget = reasoning.budgetTokens !== void 0 ? reasoning.budgetTokens : reasoning.effort !== void 0 ? GOOGLE_REASONING_EFFORT_BUDGET[reasoning.effort] : void 0;
|
|
484
490
|
config.thinkingConfig = {
|
|
485
491
|
...budget !== void 0 ? { thinkingBudget: budget } : {},
|
|
@@ -507,6 +513,11 @@ function geminiAdapter(opts) {
|
|
|
507
513
|
case "high":
|
|
508
514
|
thinkingLevel = "HIGH";
|
|
509
515
|
break;
|
|
516
|
+
case "xhigh":
|
|
517
|
+
throw new core.LlmError(
|
|
518
|
+
`reasoning.effort "xhigh" is not supported for model "${model}".`,
|
|
519
|
+
{ kind: "bad_request", retryable: false }
|
|
520
|
+
);
|
|
510
521
|
default:
|
|
511
522
|
core.assertNever(reasoning.effort);
|
|
512
523
|
}
|
|
@@ -755,7 +766,7 @@ function geminiAdapter(opts) {
|
|
|
755
766
|
}
|
|
756
767
|
|
|
757
768
|
// src/pricing.ts
|
|
758
|
-
var pricingVersion = "gemini-2026-
|
|
769
|
+
var pricingVersion = "gemini-2026-08-12";
|
|
759
770
|
var TIER_FACTOR = Object.freeze({
|
|
760
771
|
standard: 1,
|
|
761
772
|
flex: 0.5,
|