babelgate 1.1.1 → 1.1.2
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
CHANGED
|
@@ -421,9 +421,6 @@ fixtures/tests — see
|
|
|
421
421
|
- **`count_tokens` is an estimate** (chars/4), marked by the
|
|
422
422
|
`x-babelgate-token-estimate: true` header — enough for Claude Code's
|
|
423
423
|
budgeting, not for billing.
|
|
424
|
-
- **Ollama clients get a single JSON reply** when they omit `stream` —
|
|
425
|
-
unlike Ollama's own API, which streams NDJSON by default. Send
|
|
426
|
-
`"stream": false` explicitly to make that intent clear.
|
|
427
424
|
- **Non-chat Gemini methods return 501** — `:countTokens`, `:embedContent`
|
|
428
425
|
and friends aren't translated.
|
|
429
426
|
- Some provider-specific features (citations, extra usage fields) map to
|
|
@@ -73,9 +73,12 @@ function toCanonicalRequest(request) {
|
|
|
73
73
|
...(opts.seed !== undefined && { seed: opts.seed }),
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
//
|
|
77
|
-
//
|
|
78
|
-
|
|
76
|
+
// Ollama's /api/chat streams NDJSON unless the client sends
|
|
77
|
+
// stream:false (api.md: "stream ... if false the response will be
|
|
78
|
+
// returned as a single response object"; default true) — so an
|
|
79
|
+
// omitted flag maps to canonical stream:true and only an explicit
|
|
80
|
+
// false opts out.
|
|
81
|
+
if (request.stream !== false) {
|
|
79
82
|
result.stream = true;
|
|
80
83
|
}
|
|
81
84
|
if (request.tools && request.tools.length > 0) {
|