dsh-vertex-argon 1.6.0 → 1.6.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/CHANGELOG.md +6 -0
- package/adapter.js +3 -2
- package/interaction-adapter.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `dsh-vertex-argon` are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.6.1] - 2026-10-25
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- **1-to-1 Tiered Upstream Model Mapping on Antigravity Proxy (`adapter.js`, `interaction-adapter.js`)**:
|
|
9
|
+
- Mapped `Gemini 4 Argon (Antigravity)` (`gemini-4-argon-proxy`) reasoning levels (`Low` / `Medium` / `High`) directly to the tiered upstream model IDs expected by `Antigravity Tools` (`gemini-4-argon-low`, `gemini-4-argon-medium`, `gemini-4-argon-high`) across both `GenerateContent` and `Interactions` while keeping official Vertex AI and Gemini API routes on `gemini-4-argon`.
|
|
10
|
+
|
|
5
11
|
## [1.6.0] - 2026-10-25
|
|
6
12
|
|
|
7
13
|
### Added
|
package/adapter.js
CHANGED
|
@@ -200,6 +200,7 @@ export function gemini4StreamSimple(
|
|
|
200
200
|
const mapped = requestModel?.thinkingLevelMap?.[rawLevel] ?? rawLevel
|
|
201
201
|
const level = typeof mapped === 'string' ? mapped.toLowerCase() : fallback
|
|
202
202
|
if (!LEVELS.includes(level)) throw new LlmError('Gemini 4 Argon requires low, medium or high.', 'UNSUPPORTED_REASONING_EFFORT')
|
|
203
|
+
const resolvedUpstreamModelId = requestModel?.id === PROXY_MODEL ? `${MODEL}-${level}` : upstreamModelId
|
|
203
204
|
const { reasoning, thinking, thinkingBudgets, temperature, onPayload: prior, onProviderStreamEvent: priorEvent, ...rest } = options
|
|
204
205
|
const requestedMaxTokens = options.maxTokens ?? requestModel.maxTokens
|
|
205
206
|
const effectiveMaxTokens =
|
|
@@ -232,7 +233,7 @@ export function gemini4StreamSimple(
|
|
|
232
233
|
if (!body || typeof body !== 'object' || Array.isArray(body) || !Array.isArray(body.contents) || !body.config || typeof body.config !== 'object' || Array.isArray(body.config)) {
|
|
233
234
|
throw new LlmError('Gemini 4 Argon received an incompatible native payload.', 'INVALID_REQUEST')
|
|
234
235
|
}
|
|
235
|
-
if (body.model !== requestModel.id && body.model !== upstreamModelId) {
|
|
236
|
+
if (body.model !== requestModel.id && body.model !== upstreamModelId && body.model !== resolvedUpstreamModelId) {
|
|
236
237
|
throw new LlmError('Gemini 4 Argon received an incompatible model payload.', 'INVALID_REQUEST')
|
|
237
238
|
}
|
|
238
239
|
body = signatures.restorePayload(body)
|
|
@@ -244,7 +245,7 @@ export function gemini4StreamSimple(
|
|
|
244
245
|
: {}
|
|
245
246
|
return {
|
|
246
247
|
...body,
|
|
247
|
-
model:
|
|
248
|
+
model: resolvedUpstreamModelId,
|
|
248
249
|
config: {
|
|
249
250
|
...cleanConfig,
|
|
250
251
|
...(cleanConfig.tools?.some(tool => tool.functionDeclarations?.length) ? {
|
package/interaction-adapter.js
CHANGED
|
@@ -123,7 +123,7 @@ export function createInteractionsHandler({ ctx, GoogleGenAI, resolveSecret, get
|
|
|
123
123
|
return block
|
|
124
124
|
}) }))
|
|
125
125
|
const { streamInteractions } = await import('./interactions.js')
|
|
126
|
-
for await (const chunk of streamInteractions({ ...options, messages, signal }, { route, upstreamModel: 'gemini-4-argon', ...controls, serviceTier: route === 'google-generative-ai' ? servicePolicy.tier : undefined, background: cfg.interactionsBackground, store: cfg.allowInteractionStorage, transport, resolveImage, structuredOutput, onEvent: observed, onTerminal: () => { complete = true }, onExit: reason => { exitReason = reason } })) {
|
|
126
|
+
for await (const chunk of streamInteractions({ ...options, messages, signal }, { route, upstreamModel: proxy ? `gemini-4-argon-${controls.reasoning}` : 'gemini-4-argon', ...controls, serviceTier: route === 'google-generative-ai' ? servicePolicy.tier : undefined, background: cfg.interactionsBackground, store: cfg.allowInteractionStorage, transport, resolveImage, structuredOutput, onEvent: observed, onTerminal: () => { complete = true }, onExit: reason => { exitReason = reason } })) {
|
|
127
127
|
if (chunk.type === 'usage') {
|
|
128
128
|
recordUsage(chunk.usage)
|
|
129
129
|
if (firstInput !== undefined) {
|
package/package.json
CHANGED