@expiren/opencode-antigravity-auth 1.6.46 → 1.6.47
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/dist/index.js +15 -4
- package/dist/index.js.map +2 -2
- package/dist/src/plugin.d.ts.map +1 -1
- package/dist/src/plugin.js +17 -4
- package/dist/src/plugin.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12734,8 +12734,10 @@ var createAntigravityPlugin = (providerId) => async ({ client, directory }) => {
|
|
|
12734
12734
|
if (!bodyStr) return;
|
|
12735
12735
|
try {
|
|
12736
12736
|
const parsed = JSON.parse(bodyStr);
|
|
12737
|
+
const originalThinking = parsed.generationConfig?.thinkingConfig;
|
|
12737
12738
|
parsed.generationConfig = {
|
|
12738
|
-
maxOutputTokens: 1
|
|
12739
|
+
maxOutputTokens: originalThinking ? 256 : 1,
|
|
12740
|
+
...originalThinking ? { thinkingConfig: { thinkingBudget: 128 } } : {}
|
|
12739
12741
|
};
|
|
12740
12742
|
pushDebug("cache-warmup-probe: start");
|
|
12741
12743
|
const probeResponse = await fetch(toUrlString(prepared.request), {
|
|
@@ -12743,15 +12745,24 @@ var createAntigravityPlugin = (providerId) => async ({ client, directory }) => {
|
|
|
12743
12745
|
method: "POST",
|
|
12744
12746
|
body: JSON.stringify(parsed)
|
|
12745
12747
|
});
|
|
12748
|
+
let probeBody = "";
|
|
12746
12749
|
if (probeResponse.body) {
|
|
12747
12750
|
const reader = probeResponse.body.getReader();
|
|
12748
|
-
|
|
12751
|
+
const decoder = new TextDecoder();
|
|
12752
|
+
let chunk;
|
|
12753
|
+
while (!(chunk = await reader.read()).done) {
|
|
12754
|
+
probeBody += decoder.decode(chunk.value, { stream: true });
|
|
12749
12755
|
}
|
|
12750
12756
|
} else {
|
|
12751
|
-
await probeResponse.text();
|
|
12757
|
+
probeBody = await probeResponse.text();
|
|
12752
12758
|
}
|
|
12753
12759
|
const status = probeResponse.status;
|
|
12754
|
-
|
|
12760
|
+
if (status >= 400) {
|
|
12761
|
+
const errorSnippet = probeBody.slice(0, 200);
|
|
12762
|
+
pushDebug(`cache-warmup-probe: done status=${status} error=${errorSnippet}`);
|
|
12763
|
+
} else {
|
|
12764
|
+
pushDebug(`cache-warmup-probe: done status=${status}`);
|
|
12765
|
+
}
|
|
12755
12766
|
} catch (error) {
|
|
12756
12767
|
pushDebug(
|
|
12757
12768
|
`cache-warmup-probe: failed ${error instanceof Error ? error.message : String(error)}`
|