@magpie-community/opencode-kiro-auth 0.1.22 → 0.1.23
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 +4 -0
- package/index.mjs +7 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -145,6 +145,10 @@ request:
|
|
|
145
145
|
IDE sends it: `additionalModelRequestFields` with `thinking.type:
|
|
146
146
|
"adaptive"` and `output_config.effort` (or `reasoning.effort`), and no
|
|
147
147
|
budget. So xhigh and max stay apart there (#538).
|
|
148
|
+
Thinking is asked for only when the request's `thinking` is `enabled` or
|
|
149
|
+
`adaptive`. An effort with no `thinking`, or with it `disabled` (Claude
|
|
150
|
+
Code's title requests, or a turn with thinking off), is sent with no
|
|
151
|
+
thinking at any level.
|
|
148
152
|
- Anthropic's hosted web search is answered with Kiro's own web search
|
|
149
153
|
(see [Web search](#web-search)).
|
|
150
154
|
- Kiro's failures keep their meaning:
|
package/index.mjs
CHANGED
|
@@ -842,10 +842,15 @@ function documentText(p) {
|
|
|
842
842
|
}
|
|
843
843
|
|
|
844
844
|
// thinking is whether the model is asked to think aloud, and for how
|
|
845
|
-
// long: when the caller asked for it, of a Claude model (or Auto).
|
|
845
|
+
// long: when the caller asked for it, of a Claude model (or Auto). Only a
|
|
846
|
+
// thinking of type enabled or adaptive asks for it, as Anthropic's API
|
|
847
|
+
// reads a request: an effort with no thinking (Claude Code's title and
|
|
848
|
+
// other side requests, or its main turn with thinking turned off), or with
|
|
849
|
+
// thinking disabled, is sent no thinking at any level (#538), as magpie's
|
|
850
|
+
// gateway reads it too.
|
|
846
851
|
function thinking(req, model) {
|
|
847
852
|
const effort = req.output_config?.effort ?? ""
|
|
848
|
-
const on = req.thinking?.type === "enabled" || req.thinking?.type === "adaptive"
|
|
853
|
+
const on = req.thinking?.type === "enabled" || req.thinking?.type === "adaptive"
|
|
849
854
|
if (!on || !thinks(String(model).toLowerCase())) return 0
|
|
850
855
|
const budget = { low: 10000, high: 30000, xhigh: 50000, max: 50000 }[effort]
|
|
851
856
|
if (budget) return budget
|