narrarium-engine 0.1.17 → 0.1.20
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 +24 -4
- package/dist/ai/config.d.ts +91 -0
- package/dist/ai/config.d.ts.map +1 -1
- package/dist/ai/config.js +150 -0
- package/dist/ai/config.js.map +1 -1
- package/dist/ai/fetch-client.d.ts +27 -3
- package/dist/ai/fetch-client.d.ts.map +1 -1
- package/dist/ai/fetch-client.js +228 -126
- package/dist/ai/fetch-client.js.map +1 -1
- package/dist/ai/memory.d.ts +34 -0
- package/dist/ai/memory.d.ts.map +1 -0
- package/dist/ai/memory.js +27 -0
- package/dist/ai/memory.js.map +1 -0
- package/dist/ai/provider-error.d.ts +50 -0
- package/dist/ai/provider-error.d.ts.map +1 -0
- package/dist/ai/provider-error.js +197 -0
- package/dist/ai/provider-error.js.map +1 -0
- package/dist/ai/redact.js +1 -1
- package/dist/ai/redact.js.map +1 -1
- package/dist/ai/request.d.ts +98 -9
- package/dist/ai/request.d.ts.map +1 -1
- package/dist/ai/request.js +153 -23
- package/dist/ai/request.js.map +1 -1
- package/dist/ai/responses.d.ts +106 -0
- package/dist/ai/responses.d.ts.map +1 -0
- package/dist/ai/responses.js +226 -0
- package/dist/ai/responses.js.map +1 -0
- package/dist/ai/router.d.ts +9 -1
- package/dist/ai/router.d.ts.map +1 -1
- package/dist/ai/router.js +6 -1
- package/dist/ai/router.js.map +1 -1
- package/dist/ai/routing.d.ts.map +1 -1
- package/dist/ai/routing.js +11 -5
- package/dist/ai/routing.js.map +1 -1
- package/dist/ai/types.d.ts +25 -2
- package/dist/ai/types.d.ts.map +1 -1
- package/dist/ai/types.js +1 -0
- package/dist/ai/types.js.map +1 -1
- package/dist/autopilot/attempt.d.ts +11 -0
- package/dist/autopilot/attempt.d.ts.map +1 -0
- package/dist/autopilot/attempt.js +53 -0
- package/dist/autopilot/attempt.js.map +1 -0
- package/dist/autopilot/calls/recorder.d.ts.map +1 -1
- package/dist/autopilot/calls/recorder.js +5 -1
- package/dist/autopilot/calls/recorder.js.map +1 -1
- package/dist/autopilot/calls/run-calls.d.ts.map +1 -1
- package/dist/autopilot/calls/run-calls.js +5 -0
- package/dist/autopilot/calls/run-calls.js.map +1 -1
- package/dist/autopilot/calls/types.d.ts +10 -3
- package/dist/autopilot/calls/types.d.ts.map +1 -1
- package/dist/autopilot/calls/types.js +2 -2
- package/dist/autopilot/calls/types.js.map +1 -1
- package/dist/autopilot/errors.d.ts.map +1 -1
- package/dist/autopilot/errors.js +42 -0
- package/dist/autopilot/errors.js.map +1 -1
- package/dist/autopilot/live.d.ts +11 -1
- package/dist/autopilot/live.d.ts.map +1 -1
- package/dist/autopilot/live.js +17 -2
- package/dist/autopilot/live.js.map +1 -1
- package/dist/autopilot/runner.d.ts +5 -0
- package/dist/autopilot/runner.d.ts.map +1 -1
- package/dist/autopilot/runner.js +40 -1
- package/dist/autopilot/runner.js.map +1 -1
- package/dist/autopilot/session.d.ts +8 -0
- package/dist/autopilot/session.d.ts.map +1 -1
- package/dist/autopilot/session.js +10 -2
- package/dist/autopilot/session.js.map +1 -1
- package/dist/autopilot/types.d.ts +81 -6
- package/dist/autopilot/types.d.ts.map +1 -1
- package/dist/autopilot/types.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -157,7 +157,7 @@ Data the web app's pages used to have to guess (from the text of a step, from th
|
|
|
157
157
|
| `conflict` | A file changed under the step and the retries are used up (`BookConflictError`); or, on a personal server, the server's work conflicts with GitHub (code `github_conflict`, with `githubConflicts` in the detail: the author chooses the version of each file, see *The personal server client*). |
|
|
158
158
|
| `unknown` | Everything else. |
|
|
159
159
|
|
|
160
|
-
`errorDetail` is `{ status?, endpoint?, model?, provider?, integration?, retryAfterMs?, attempt?, retries?, timeoutMs?, timeoutPhase?, githubConflicts?, transport?, route? }` (`route`: every candidate of the route of the call that failed, in the order the author wrote it: see *The route of a call*), short and with no secret in any field: `githubConflicts` is there only for a conflict with GitHub (an error whose `code` is `GITHUB_CONFLICT_CODE`, `"github_conflict"`, and whose `total` says how many files: never retried, the author chooses), a whole number from 1 (read back from a file the same way); `status` is the HTTP status when the provider answered; `retryAfterMs` is what the provider asked for with `Retry-After` in milliseconds, on a 429 or a 503 only and only when it said (the engine's client keeps at most five minutes of it, `0` is a value, and a value read from a file is a whole number from 0 to a day, else it is dropped), so that a client can say *the provider asks to wait 30 s* without guessing it from the retry; `endpoint` is only the **origin** of the integration's address (`new URL(address).origin`: never a path, a query, a fragment or credentials, and nothing at all for an address that is not a web address); `model`, `provider` and `integration` (the id) are passed through `redactSecrets` and cut at 160 characters. `attempt` and `retries` are there only for a failure that is retried: the retry it belongs to (the one that followed it, or the last one made when the run gave up) and how many retries this kind of failure gets, the numbers of the `failureRetry` insight; a failure that is never retried (a 401) has neither. `timeoutPhase` (`"start"`, `"idle"` or `"total"`) and `timeoutMs` are there only for a timeout of the engine's client: which deadline ran out (the provider did not begin answering, it went silent while it answered, or the call took longer than any call may) and how long it was, in milliseconds (a value read from a file is a whole number from 1 ms to a day, else it is dropped); see *Timeouts and streaming*. Where an error came from is `AiProviderError.target` (`{ provider, model, integrationId, endpoint? }`, the endpoint already an origin), which the engine's client sets on the error of the last candidate it tried; it is separate from the error's own `model`, `provider` and `integrationId`, whose presence means that the model had started to answer and is billed. `transport` is there for a call that failed after the provider answered and whose response said something beyond its status (it carried bytes, a request id, an end or a finish reason): `{ status?, bytes?, chunks?, events?, lastChunkAfterMs?, silentMs?, end?, finishReason?, usageReceived?, usageRequested?, tail?, requestId?, partialCharacters? }`, the numbers of `AiTransportDiagnostics`, the last 300 characters of the stream (credentials replaced, no reasoning) and how many characters of the reply had arrived; every field is checked when a state is read, and a file cannot make one longer or put a key in it. A state written before the errors were classified has `lastError` with a message and no kind: `summary.lastError` then has none either.
|
|
160
|
+
`errorDetail` is `{ status?, endpoint?, model?, provider?, integration?, retryAfterMs?, attempt?, retries?, timeoutMs?, timeoutPhase?, githubConflicts?, transport?, route?, body? }` (`route`: every candidate of the route of the call that failed, in the order the author wrote it: see *The route of a call*; `body`: what the provider answered, in its own words: see *What the provider said*), short and with no secret in any field: `githubConflicts` is there only for a conflict with GitHub (an error whose `code` is `GITHUB_CONFLICT_CODE`, `"github_conflict"`, and whose `total` says how many files: never retried, the author chooses), a whole number from 1 (read back from a file the same way); `status` is the HTTP status when the provider answered; `retryAfterMs` is what the provider asked for with `Retry-After` in milliseconds, on a 429 or a 503 only and only when it said (the engine's client keeps at most five minutes of it, `0` is a value, and a value read from a file is a whole number from 0 to a day, else it is dropped), so that a client can say *the provider asks to wait 30 s* without guessing it from the retry; `endpoint` is only the **origin** of the integration's address (`new URL(address).origin`: never a path, a query, a fragment or credentials, and nothing at all for an address that is not a web address); `model`, `provider` and `integration` (the id) are passed through `redactSecrets` and cut at 160 characters. `attempt` and `retries` are there only for a failure that is retried: the retry it belongs to (the one that followed it, or the last one made when the run gave up) and how many retries this kind of failure gets, the numbers of the `failureRetry` insight; a failure that is never retried (a 401) has neither. `timeoutPhase` (`"start"`, `"idle"` or `"total"`) and `timeoutMs` are there only for a timeout of the engine's client: which deadline ran out (the provider did not begin answering, it went silent while it answered, or the call took longer than any call may) and how long it was, in milliseconds (a value read from a file is a whole number from 1 ms to a day, else it is dropped); see *Timeouts and streaming*. Where an error came from is `AiProviderError.target` (`{ provider, model, integrationId, endpoint? }`, the endpoint already an origin), which the engine's client sets on the error of the last candidate it tried; it is separate from the error's own `model`, `provider` and `integrationId`, whose presence means that the model had started to answer and is billed. `transport` is there for a call that failed after the provider answered and whose response said something beyond its status (it carried bytes, a request id, an end or a finish reason): `{ status?, bytes?, chunks?, events?, lastChunkAfterMs?, silentMs?, end?, finishReason?, usageReceived?, usageRequested?, tail?, requestId?, partialCharacters? }`, the numbers of `AiTransportDiagnostics`, the last 300 characters of the stream (credentials replaced, no reasoning) and how many characters of the reply had arrived; every field is checked when a state is read, and a file cannot make one longer or put a key in it. A state written before the errors were classified has `lastError` with a message and no kind: `summary.lastError` then has none either.
|
|
161
161
|
|
|
162
162
|
**The retry that is waiting.** While the run waits to try a failed step again, `summary.retry` is `{ at, attempt, retries }`: `at` is the ISO time of the next attempt, `attempt` and `retries` those of the `failureRetry` insight (`retry 2 of 3`). In a wait of «Retry later» it is `{ at, attempt, retries, longTerm: { cycle, cycles } }`: `attempt` and `retries` are then the quick retries that were made, `cycle` the cycle of the wait (from 1) and `cycles` how many there are, `null` for no limit (the numbers of the `longRetryWait` insight: «ripartenza 2 di 3», *restart 2 of 3*); the rest of the summary is what it always was. It is never saved, and it is the fourth field of the summary that only a live session knows (see *What the summary says*). Every change is a `state` event, so a client counts down without guessing: one event when the wait begins (right after the `failureRetry` or `longRetryWait` insight), one when it is over and the attempt starts (the summary has no `retry` then; after «Retry now» that event follows the `retrySkipped` insight at once), and the last summary of a run that ends, or is paused, during the wait has none. A host that gets the state from a `state` event replaces its summary by the newest one it has seen, and so the retry goes away. A client offers «Retry now» (`session.retryNow()`, or `retryNow(bookId)` of the server's client) while `retry` is there.
|
|
163
163
|
|
|
@@ -169,6 +169,8 @@ Data the web app's pages used to have to guess (from the text of a step, from th
|
|
|
169
169
|
|
|
170
170
|
**The step that is answering.** `task-progress` says that the model of the running step is answering. A step that writes prose says it as it always did: `preview` (the tail of the text so far) and `characters`, at most about three times a second. A step that answers with a structured value (the concept, the plan, a reader's evaluation, the director's decisions, the summary of a scene) says it with numbers only: `{ type: "task-progress", activityId, characters, bytes, preview: "" }`, where `bytes` is what has arrived of the reply and `characters` the characters of its function arguments, never a word of the reply, and **one event a second** for each step at most (the client reports up to four times a second, and the stream of a server is not flooded). It only exists while the provider streams: with `streamMode: "off"` there is nothing to say until the reply is whole. Like every `task-progress` it is never saved (not in `state.json`, not in the log, not a commit) and never replayed to a client that connects later; `snapshot().live` carries what a client shows of the step (see below). The event is the same one the prose steps have: `preview` stays a string (empty here), and `bytes` is the only new field, so a client that knows nothing of it reads `characters` and an empty preview. A step that writes a scene and then asks for its summary says both kinds one after the other, as two calls of the step. A client of the personal server gets the events as they are (the engine's client hands over every message of the stream, and a type it does not know is the host's to ignore). **What a client shows of it** (`AutopilotLive`, which `snapshot().live` is) follows the events by one rule, `applyLiveProgress(live, event)` (`startLive(activity)` at `task-started`, `normalizeLive(value)` for a live part read from another host), which the web app uses too: every progress says which call of the step it is (`callSeq`, from 1; `callId` when the book keeps records), and a call starts from nothing, so nothing of a scene is shown while its summary streams and nothing of one call while the next answers (an engine that names no calls is read by the kind and the bytes: prose after a structured reply, a structured reply after prose, or numbers whose bytes went back, are another call). The text of a call (its prose, or the JSON of a structured reply, `json: true`) replaces what was shown and never goes back to nothing until the call ends: the empty text that says a new attempt begins changes nothing, and the new attempt takes the place of the old one when it writes. A progress without a `preview` keeps the text shown. The numbers of a structured reply set `bytes` and never touch the text (a shorter JSON, the next attempt's, drops the bytes of the one before), and its count is the JSON's (`characters` of the numbers event is the JSON's once it streams, the client's own count before), so a reply that streams its JSON keeps it on screen while its numbers arrive, and one that does not says «answering» with its bytes.
|
|
171
171
|
|
|
172
|
+
**Which candidate answers.** `call-attempt` says which candidate of the AI Router the call of the running step asks now, as its request is sent: `{ type: "call-attempt", activityId, callSeq, callId?, attempt, attempts, candidateIndex, candidateCount, fallback, integrationId, integrationName, provider, model, thinking, thinkingWhy?, streamMode }`. `attempt` is which request of the call this is (from 1: every request counts, the ones that failed before it too) of `attempts`, the most the call can make (the candidates of its route that the plan did not leave out); `candidateIndex` is the place of the candidate in the route as the author wrote it (0 is the primary, anything above is a fallback: `fallback`) of `candidateCount`. `thinking` is what the request does of the thinking level: the level that is sent (`low`, `medium`, `high`, `xhigh`), `automatic` when none is chosen (nothing is sent and the model decides) or `not-sent` when one is chosen and the model does not take it (`supportsReasoning: false`, or a thinking parameter `none`, or, with `thinkingWhy: "tools"`, a request that carries function tools to a model that refuses a level with them), or `none` when `reasoning_effort: "none"` is what the request carries (with `thinkingWhy: "tools"`: a model that takes function tools with `none` only). It names its call as `task-progress` does (`callSeq` always, `callId` when the book keeps records) and is said whether or not the book keeps records, at the start of every attempt: a call that goes on to its fallback says the next candidate, and the next replaces the one before. It is kept in the replay of the session like `call-started`, and it is names and numbers only: never a prompt, a reply, a key or an endpoint. `snapshot().live.trying` is the last one of the call in flight, by the same rule that follows the text (`applyLiveAttempt(live, event)`, next to `applyLiveProgress`; `normalizeLive` reads it from another host and keeps only what it may say): it stays through the text and the numbers of the call, the next attempt of the call replaces it (the text of the attempt before stays until the new one writes), the text of another call takes it away until that call says its own, and the step that ends clears it with the rest of the live part, so a client that connects in the middle of a step shows the candidate at once. A host that does not say it (a server older than this engine) leaves `trying` out, and a client shows nothing for it. What a client shows of it is the web app's: the band, the live panel and the card of the step that runs say the model, the integration, `Primary` or `Fallback N`, the thinking and, for a call that went on, `attempt 2/3`.
|
|
173
|
+
|
|
172
174
|
**What a model declares.** The safe view of the AI configuration (`redactAiRuntimeConfig(config).integrations[].models[]`, which the personal server's `GET /ai` forwards as it is) says, for every model, what its configuration declares: `supportsToolCalls`, `supportsStreaming`, `supportsReasoning`, `supportsVision`, `maxInputTokens` and `maxOutputTokens`, and the `reasoningParameter` that says how its thinking level is sent (the "Thinking parameter" of the model, «Parametro del thinking»: `reasoning_effort`, `chat_template_kwargs.reasoning_strength` or `none`, with `AI_REASONING_PARAMETERS` for the list and `suggestedReasoningParameter(name, underlyingModel?)` for a hint that a screen may offer, which the engine never applies by itself), each only when it is declared or set (a model that declares nothing is `{ name, capabilities }`, as it always was). An attempt says what it did not do because of it: `onAttempt.notes` (English, absent when there is nothing to say; `ChatRequest.notes` for a host that builds the request itself), and `onAttempt.reasoningParameter` where the level went when it did not go as `reasoning_effort`. A reply cut with nothing written by a model declared as reasoning is a `truncated` error with `reasoningOnly`, so its `errorKind` is `truncated` like any cut reply. What an endpoint says of its models, and whether it answers at all, is what `fetchModelCatalog` and `probeEndpoint` return: see *Model catalog and declared capabilities*. All of it is additive: a configuration that declares nothing reads and runs as it always did.
|
|
173
175
|
|
|
174
176
|
**The outline and the ghostwriter of every chapter.** `PlannedChapter.ghostwriter` is the ghostwriter the outline gives the chapter (the slug of `ghostwriters/<slug>.md`), absent when it is the book's; the chapter's `chapter.md` says it too, so a page that shows the chapter reads it where it always did. `PlannedChapter.outlineDigest` is the digest of the chapter's entry of the outline (`outlineEntryDigest`) as it was when the plan followed it, or wrote it: an entry whose `contentDigest` is not the chapter's `outlineDigest` has been changed by the author since (`outlinePlanStatus(reader, state, language)` says which ones, for a chapter not written yet and for the written ones). `plan.removedChapters` lists the chapters taken out of the plan because the author deleted their entry. `options.fillOutline` (on by default, saved with the other options, not changeable while a run is active) says whether the plan fills the outline. `state.concept.logline` is the pitch of the concept, which becomes the description of the outline. New task kind: `replan` (a chapter planned again from its new entry, or taken out of the plan). New insight codes: `outlineGhostwriter`, `outlineChanged`, `outlineRemoved`, `outlineChangedWhileWriting` (the entry of a chapter still being written changed: it is decided once the chapter is closed), `outlineWrittenChanged` (the entry of a written chapter changed, and with `frozenEdits: "notify"` it is only said), `outlineRemovedWritten` (a written chapter is no longer in the outline: it stays in the book), `outlineWarnings`, each with `chapterNumber` (see *Outline (Scaletta)*). An engine from before them said the first and the third with `outlineWrittenChanged` as well. An engine from before these fields drops them on its first write; the outline files stay, the next plan of a newer engine reads them again, and a chapter whose plan lost its digest is not planned again from an entry the autopilot wrote (only from one of the author).
|
|
@@ -599,15 +601,17 @@ What every host gets, whatever its options:
|
|
|
599
601
|
| What | How |
|
|
600
602
|
|---|---|
|
|
601
603
|
| Request | `buildChatRequest(candidate, request, { githubModelsBaseUrl })` is the only place a request is built: URL, headers, body, streaming, tools or JSON-in-prompt, and the output limit parameter of the model family. Where the thinking level goes (`reasoning_effort`, or the chat-template argument the model says: see *Thinking*) is decided there too. Pure and exported, so hosts can test their configuration against it. Every request streams (`stream: true`, `stream_options: { include_usage: true }`), a structured one included, unless the integration's `streamMode` is `"off"` or the model declares `supportsStreaming: false`: see *Timeouts and streaming* and *Declared capabilities of a model*. A host that has a conversation (the web app's Copilot: its history, and the images the author attached) gives `AiRequest.messages` (`{ role: "system" | "user" | "assistant", content }`, the content text or a list of parts, `{ type: "text", text }` and `{ type: "image", dataUrl }`) and that is what is sent, in place of `system` and `user` (give empty text); a part of text goes out as a text part and an image as an `image_url` with its data URL, and an image weighs `IMAGE_TOKEN_ESTIMATE` (4096) tokens of the prompt, whatever its size. With a structured request the JSON instruction of a model without tool calls goes into the first system message (into one of its own, placed first, when there is none). The messages are never changed. A request without `messages` is built exactly as it always was. |
|
|
604
|
+
| API version | Azure OpenAI only. A request carries the API version of the model that is asked: `AiChatModelConfig.apiVersion` (the model's own), else `AiIntegrationConfig.apiVersion` (the default of the models that do not have their own), else `DEFAULT_AZURE_API_VERSION`; `effectiveApiVersion(integration, model)` is the one place that says which (`v1` for the v1 API, whose address has no `api-version`, and `undefined` for a provider that has none), and the address, the output-limit parameter and the shape of `tool_choice` follow it, so a model with an old version is asked as an old API wants and its neighbour as a new one. A fallback in another integration or another model is asked with its own. `AiCandidate.apiVersion` is the model's own, and `onAttempt(attempt).apiVersion`, `AiProviderError.target.apiVersion`, `AiRouteStep.apiVersion`, `errorDetail.apiVersion` and the `apiVersion` of the attempts of a call record say the one that was sent. An empty field is no field, so a configuration saved before it existed asks as it always did, and `pickAiRuntimeConfig` and `redactAiRuntimeConfig` (the safe view of a personal server's configuration) carry it. |
|
|
605
|
+
| API protocol | `AiChatModelConfig.apiProtocol` is `chat-completions` (what no value means: the configurations saved before it existed ask as they always did) or `responses` (`AI_API_PROTOCOLS`, `normalizeApiProtocol`); `AiChatModelConfig.endpointUrl` is an address of the model's own, used **exactly as written** (query included) with the key of its integration (`api-key` for Azure OpenAI, a bearer token for the others) and with no API version of ours (`effectiveApiVersion` and `effectiveResponsesApiVersion` say `undefined` for it); only an http or https address with no user name or password is one (`endpointUrlProblem`, `normalizeEndpointUrl`), and `endpointUrlSecretKeys` names the parameters of its query that look like a key (`key`, `api-key`, `token`, `sig`, `code`…), which an editor warns of, since the address is saved with the settings. `pickAiRuntimeConfig` and `redactAiRuntimeConfig` carry both (the safe view says the protocol and `describeUrl(endpointUrl)`: the host and the path, never the query), so a personal server's configuration does, and `AiCandidate` has them. `modelRequestTarget(integration, model)` is the one rule of where a model's requests go, which a client and an editor both ask: the address of the model, or built from the integration (`<base>/chat/completions`, `…/openai/deployments/<model>/chat/completions?api-version=…` for Azure OpenAI; for the Responses API `<base>/responses`, `…/openai/responses?api-version=…` and `…/openai/v1/responses`; GitHub Models has no Responses API: `{ problem: "no-responses-api" }`, and the request is refused with those words unless the model has an address of its own). The API version of a request to the Responses API is `effectiveResponsesApiVersion`: `v1` for the v1 API; else the model's own; else the integration's when it has the Responses API (`azureVersionHasResponses`: `v1`, `preview`, or a date from `2025-03-01`); else `DEFAULT_AZURE_RESPONSES_API_VERSION` (`2025-04-01-preview`, the one of the Azure portal's playground). `buildChatRequest` builds either request (`ChatRequest.protocol`; `ChatRequest.messages` are the messages in the engine's form, whichever protocol they go in): for the Responses API `model`, `input` (the system prompt as a `developer` message, `input_text` and `input_image` parts, `output_text` for an assistant), `max_output_tokens` (what Chat Completions calls `max_completion_tokens`: the same limit, with the same floor and margin), `temperature` under the same rule, `reasoning: { effort }`, `store: false`, `stream: true`, and, for the forced function, `tools: [{ type: "function", name, description, parameters, strict: false }]` with `tool_choice: "required"`; `text.format` is not sent (a structured reply is the call of the function, as with Chat Completions) nor `include` (no reasoning item is ever sent back). With the Responses API a thinking level and function tools go together, so `noThinkingWithTools` is not used (`withToolsRule`) and a refusal of the kind is no refusal to ask again without a level; a model whose level goes in the chat template (`reasoningParameter: "chat_template_kwargs.reasoning_strength"`) is sent none, since the Responses API has one field for it. The reply is read by `ResponsesStreamReader` and `readResponse` (`responses.ts`), which tell the events of the Responses API (`response.output_text.delta`, `response.reasoning_summary_text.delta`, `response.function_call_arguments.delta` and `.done`, `response.output_item.added` and `.done`, `response.completed`, `response.incomplete`, `response.failed`, `error`; any other event is ignored) as the pieces that the client reads a Chat Completions stream by, so the deadlines, the live JSON (`onStructuredText`), the progress, the tokens (`input_tokens`, `input_tokens_details.cached_tokens`, `output_tokens`: the reasoning tokens are inside the output tokens, so they are priced as output) and the failures are the same code for both protocols; a stream ends with its last event (there is no `[DONE]`: `transport.end` is `done` once the provider sent it, `closed` when the stream stopped before it), what a server says twice (deltas, then the whole in a `done` event, then in the last event) is read once, `incomplete` with `max_output_tokens` is a reply cut by the output limit (`reasoningOnly` when only reasoning tokens were spent), `content_filter` and a refusal are failures with the provider's words, and an `error` event or a `failed` response is the failure of the call, retried or not by what its words say. `onAttempt(attempt).protocol`, `AiProviderError.target.protocol` and `.path`, `AiRouteStep.protocol` and `.path` (the path of an address of the model's own: the trail says the host and the path of the address, never its query), `errorDetail.protocol` and `.path`, and the `protocol` of the attempts of a call record say how a request was made. |
|
|
602
606
|
| Output limit | A structured request gets at least `STRUCTURED_OUTPUT_FLOOR` (4096) tokens. A model known to reason by name (o1/o3/o4, gpt-5, codex-mini; for Azure the declared underlying model, else the deployment name) gets `REASONING_OUTPUT_MARGIN` (12 000) more, because its reasoning is counted in the limit; so does a model whose configuration declares `supportsReasoning: true` (a declaration never takes away the margin of a model known by its name). Never above the model's own `maxOutputTokens`. An Azure deployment of unknown identity gets `max_completion_tokens` from API version 2024-09-01, `max_tokens` before. |
|
|
603
607
|
| Prompt size | A candidate whose `maxInputTokens` (context window) cannot hold the prompt (estimated with `likelyMessageTokens`, the tool schema included, against `resolveModelTokenBudgets`: window minus the output reserve minus a 5% margin) is skipped. If no candidate can, `AiPromptTooLargeError` (not retryable) gives the estimate and the largest budget. A prompt is never cut. |
|
|
604
608
|
| Privacy of fallbacks | `fallbackDisclosure.sameBoundaryOnly` excludes fallbacks outside the primary's integration (the boundary). `requireAcknowledgement` asks `options.acknowledgeFallback(from, to, { capability, label })` before content goes to an integration it has not gone to: only `true` allows it, a throw cancels the call, and a host without the hook (the server) never crosses (fail closed). The engine asks at every call that needs the crossing (once per pair of accounts within a call), so a host that remembers acknowledgements answers from its memory. When nothing is left to call, the error names the setting and how to change it. |
|
|
605
609
|
| Routing limits | `routingExecution`: `maxCandidates`, `maxTotalDurationMs`, `maxTokenAttempts`, `maxEstimatedCost`. The total time never interrupts the first candidate before its own timeout; later candidates start only while time remains and run for what remains. Tokens and cost are estimated per attempt from the real prompt and the output limit (reasoning margin included): candidates are kept while the sum fits, and a first attempt that alone exceeds a limit gives `AiRoutingBudgetError`. A configuration without these fields (saved by an older host) has no such limits and no privacy policy. |
|
|
606
610
|
| Timeouts | Three, in every host: how long the provider has to begin answering (an integration's `requestTimeoutMs`, else `options.defaultTimeoutMs`, else `DEFAULT_REQUEST_TIMEOUT_MS`, 600 s; never under 30 s), the longest silence while it answers (`idleTimeoutMs`, 600 s) and the most one call may take (4 h). See *Timeouts and streaming*. |
|
|
607
|
-
| Hooks | `onAttempt(attempt)`: `attemptId`, the effective `messages` (with the JSON instruction a model without tools receives), the output limit, `stream`, `streamMode`, `tools`, `endpoint`, `timeoutMs` and `timeouts` (the three deadlines: see *Timeouts and streaming*), `toolsOnly` (whether Tools only was in force), `thinking` (the level sent, absent when none was), `reasoningParameter` (where it went, only when it went as the chat-template argument: see *Thinking*), `skipped` (the models left out, absent when none was: see *Tools only* and *Thinking*) and `notes` (what the attempt does not do that the configuration asked, because of what the model declares, in English; absent when there is nothing to say: see *Declared capabilities of a model*). `onAttemptEnd(end)`: the same `attemptId`, `outcome` (`ok`, `failed`, `cancelled`), `usage`, `cost`, `usageKnown`, `costKnown`, the reply `text` or the `error` (without credentials), `failureKind` (`timeout`, `cancelled`, `provider`), `status`, `retryAfterMs`, `timeoutMs` and `timeoutPhase` (for a timeout), `streamed`, `firstByteMs`, `toolCalled`, `durationMs` and, once a reply was read, `finishReason` (the provider's own word, empty when it said none), `replyCharacters` (its text without the reasoning, and the arguments of its function, `{}` being none) and `reasoningCharacters` (the reasoning field of the provider, and a `<think>` block in the text: the count, never the words), for every attempt that was sent, failed ones included; the three facts are there also for a reply the engine refused after reading it (one that was cut, or filtered), and absent for an attempt that never got one (a refusal, a connection that failed, a deadline that ran out first). The `messages` of `onAttempt` are copies and carry the roles and the parts (an image with its data URL), so a listener cannot change what is sent. A hook that throws never breaks a call. |
|
|
611
|
+
| Hooks | `onAttempt(attempt)`: `attemptId`, `integrationName` (as the author wrote it, cleaned of credentials), `index` of `candidates` (the place of the candidate in the route as written, 0 the primary, of how many it has) and `attempt` of `attempts` (which request of the call this is, from 1, of the most it can make: the candidates its plan did not leave out), the effective `messages` (with the JSON instruction a model without tools receives), the output limit, `stream`, `streamMode`, `tools`, `endpoint`, `timeoutMs` and `timeouts` (the three deadlines: see *Timeouts and streaming*), `toolsOnly` (whether Tools only was in force), `thinking` (the level sent, absent when none was), `thinkingMode` (the same in three words: the level that is sent, `automatic` when none is chosen, `not-sent` when one is chosen and the model does not take it), `reasoningParameter` (where it went, only when it went as the chat-template argument: see *Thinking*), `skipped` (the models left out, absent when none was: see *Tools only* and *Thinking*) and `notes` (what the attempt does not do that the configuration asked, because of what the model declares, in English; absent when there is nothing to say: see *Declared capabilities of a model*). `onAttemptEnd(end)`: the same `attemptId`, `outcome` (`ok`, `failed`, `cancelled`), `usage`, `cost`, `usageKnown`, `costKnown`, the reply `text` or the `error` (without credentials), `failureKind` (`timeout`, `cancelled`, `provider`), `status`, `retryAfterMs`, `timeoutMs` and `timeoutPhase` (for a timeout), `streamed`, `firstByteMs`, `toolCalled`, `durationMs` and, once a reply was read, `finishReason` (the provider's own word, empty when it said none), `replyCharacters` (its text without the reasoning, and the arguments of its function, `{}` being none) and `reasoningCharacters` (the reasoning field of the provider, and a `<think>` block in the text: the count, never the words), for every attempt that was sent, failed ones included; the three facts are there also for a reply the engine refused after reading it (one that was cut, or filtered), and absent for an attempt that never got one (a refusal, a connection that failed, a deadline that ran out first). The `messages` of `onAttempt` are copies and carry the roles and the parts (an image with its data URL), so a listener cannot change what is sent. A hook that throws never breaks a call. |
|
|
608
612
|
| Approving endpoints | `effectiveAiBase(integration, githubModelsBaseUrl?)` is the origin and path every request of an integration starts with, defaults included (`https://api.openai.com/v1`, `https://models.github.ai/inference`). A host that approves where API keys may be sent should compare these. |
|
|
609
613
|
| Wire format | Server-sent events with several `data:` lines are joined with a newline; the pieces of a forced function call (`delta.tool_calls[].function.arguments`) are joined into the arguments of the reply, and a last piece that carries the whole `message.tool_calls` is read too; a JSON reply to a streaming request (a server that ignores `stream`) is read as the reply; an `error` in a 200 reply is a provider error, and so is an `event: error` whatever its data is. A line ends with LF, CR or CRLF (the three that the SSE specification allows, a CRLF cut between two chunks included); a `data:` with no space after it, a last line with no newline, and `: comments`, `id:` and `retry:` lines are read as they should be; a character that a chunk cuts in two is kept until the rest comes. The tokens are read from whichever chunk carries `usage` (`prompt_tokens`/`completion_tokens`, or `input_tokens`/`output_tokens`; the cached ones from `prompt_tokens_details.cached_tokens`, `input_tokens_details.cached_tokens`, `prompt_cache_hit_tokens` or `cache_read_input_tokens`); a count of zero never replaces a real one. |
|
|
610
|
-
| Errors | `AiProviderError` carries `status`, `retryable`, `transient` (it depends on the moment: 408, 429, 502, 503, 504, Cloudflare's 520-524, network, a stream that stopped), `transport` and `partialText` (what the transport saw of the call, and the reply that had arrived: see *A stream that stops halfway*), `retryAfterMs` (the `Retry-After` of a 429 or 503, at most five minutes), `timedOut` with `timeout` (which deadline ran out, for how long), `truncated` and `reasoningOnly` (the reply was cut while the model reasoned: seen as reasoning, or, with nothing written at all, from a model declared as reasoning). `AiToolsRequiredError` (nothing can be asked: Tools only is on and no model can call a function; see *Tools only*) is the error of a call that was never sent. Keys, `Bearer …`, `api-key: …`, `?key=…` and `sk-…` are removed from every message (`redactSecrets`), also before the runner saves it. The error of a candidate that was tried carries `target` (`{ provider, model, integrationId, endpoint? }`, the endpoint only an origin: see *What the interface reads*). |
|
|
614
|
+
| Errors | `AiProviderError` carries `status`, `body` (what the provider said, in its own words: see *What the provider said*), `retryable`, `transient` (it depends on the moment: 408, 429, 502, 503, 504, Cloudflare's 520-524, network, a stream that stopped), `transport` and `partialText` (what the transport saw of the call, and the reply that had arrived: see *A stream that stops halfway*), `retryAfterMs` (the `Retry-After` of a 429 or 503, at most five minutes), `timedOut` with `timeout` (which deadline ran out, for how long), `truncated` and `reasoningOnly` (the reply was cut while the model reasoned: seen as reasoning, or, with nothing written at all, from a model declared as reasoning). `AiToolsRequiredError` (nothing can be asked: Tools only is on and no model can call a function; see *Tools only*) is the error of a call that was never sent. Keys, `Bearer …`, `api-key: …`, `?key=…` and `sk-…` are removed from every message (`redactSecrets`), also before the runner saves it. The error of a candidate that was tried carries `target` (`{ provider, model, integrationId, endpoint? }`, the endpoint only an origin: see *What the interface reads*). |
|
|
611
615
|
|
|
612
616
|
### Timeouts and streaming
|
|
613
617
|
|
|
@@ -660,11 +664,25 @@ The route is the author's, place by place: the primary is position 0 and the fal
|
|
|
660
664
|
|
|
661
665
|
What became of every candidate is an `AiRouteStep`: `{ position, integrationId, integrationName, provider, model, outcome, endpoint?, status?, durationMs?, message?, timeoutPhase?, timeoutMs?, routing?, leftOut?, why?, promptTokens?, windowTokens? }`. `outcome` is `ok`, `failed`, `timeout`, `cancelled` for a candidate that was asked (with what the provider said, cleaned of credentials and cut at 240 characters, and for a timeout which deadline ran out and, with `routing`, that it was the routing time that was left and not a limit of the call), or `left-out` for one that was not, with `leftOut` saying why: `unusable`, `no-tool-calls` (Tools only), `boundary` (`sameBoundaryOnly`), `context-window` (the prompt needs `promptTokens` and the model's window leaves `windowTokens`), `budget` (`maxTokenAttempts` or `maxEstimatedCost`), `not-acknowledged` (`requireAcknowledgement`) or `out-of-time` (`maxTotalDurationMs` was used up).
|
|
662
666
|
|
|
663
|
-
- **The error of a call that failed has the whole route.** `AiProviderError.route` (also `AiUnavailableError.route`, for a route written and none of it callable, whose message then names each target and why) is every step in the order of the route: the primary that failed at once, then the fallback that ran out of time. `error.target`, `error.model` and the rest of the error are still the last candidate's. The notes that the message ends with now also say a candidate that the context window or the routing limits left out, and a target that cannot be called. `classifyAutopilotError(error).detail.route` and `errorDetail.route` keep it, cleaned (valid steps only, no credential, an endpoint only as an origin, at most `MAX_ROUTE_STEPS`, 12).
|
|
667
|
+
- **The error of a call that failed has the whole route.** `AiProviderError.route` (also `AiUnavailableError.route`, for a route written and none of it callable, whose message then names each target and why) is every step in the order of the route: the primary that failed at once, then the fallback that ran out of time. `error.target`, `error.model` and the rest of the error are still the last candidate's. The notes that the message ends with now also say a candidate that the context window or the routing limits left out, and a target that cannot be called. `classifyAutopilotError(error).detail.route` and `errorDetail.route` keep it, cleaned (valid steps only, no credential, an endpoint only as an origin, at most `MAX_ROUTE_STEPS`, 12). A step that was refused has `body` too, the words of its own attempt.
|
|
664
668
|
- **The attempts say what was left out.** `onAttempt(attempt).leftOut` is every candidate the plan leaves out, each as a step (the same list on every attempt of the call, with a fallback that the author did not acknowledge added to the attempts after it). It is in addition to `skipped`, which keeps its shape.
|
|
665
669
|
- **The records keep it.** The record of a call (`AiCallRecord.attempts`) lists the candidates that were left out beside the attempts that were asked, in the order of the route, numbered from 1 together: an entry with `outcome: "skipped"` and `skip: { reason, why?, promptTokens?, windowTokens? }`, no duration, no usage, no error. `CallEndInfo.attempts` and the `call-ended` event count only the attempts that were asked.
|
|
666
670
|
- **A host that is ending.** `createFetchAi(config, { interrupted })`: while it answers `true` (a browser page that is being reloaded or closed), a request that fails is a failure of the host and not of the provider. The attempt is closed as `cancelled` and the call ends with the failure: the next candidate is not asked, because it would be sent the whole prompt, and billed, by a host that is no longer there.
|
|
667
671
|
|
|
672
|
+
### What the provider said
|
|
673
|
+
|
|
674
|
+
An HTTP failure becomes an `AiProviderError` in one place (the client), and the provider's answer is read there, once, the same way whatever its shape: `AiProviderError.body` is an `AiErrorBody`, `{ status, shape, message?, type?, param?, code?, raw? }`. The shapes read are OpenAI's (`{ error: { message, type, param, code } }`, which most gateways speak), Azure's (`{ error: { code, message, innererror } }`: the code of the inner error is the `type` it lacks), Anthropic's (`{ type: "error", error: { type, message } }`), Gemini's (`{ error: { code, message, status } }`, also in a list: `status` is the `type`) and the plain ones: `{ message }`, `{ detail }` (a text, or the list of problems of FastAPI), `{ error: "text" }`. A body that is none of those is kept as it is: a text, the page of a gateway (`shape: "html"`, its title in the message, the page itself in `raw`) or a JSON that nobody knows are `raw`, cut at `MAX_ERROR_RAW_CHARACTERS` (2048) with an ellipsis; a response with no body says only its status (`shape: "empty"`, `HTTP 400, no body`). The message is the provider's own words, whole, and is never cut but with an ellipsis (at `MAX_ERROR_MESSAGE_CHARACTERS`, 2000); the keys of the integrations, bearer tokens, the signature and the keys of a query and `sk-…` are taken out of every word (`redactSecrets`), and the request, the headers it carried and the `Authorization` among them are never read nor kept. The text of the error is one line, `describeErrorBody(body)`: `HTTP 400 — Function tools with reasoning_effort are not supported for gpt-6-luna in /v1/chat/completions. To use function tools, use /v1/responses or set reasoning_effort to 'none'. [type: invalid_request_error, param: reasoning_effort]`; an error inside a stream that answered 200 says its words the same way (`errorBodyOfObject`).
|
|
675
|
+
|
|
676
|
+
`body` goes where the error goes: `onAttemptEnd(end).errorBody` (and so the route: `AiRouteStep.body`), `errorDetail.body` and `route[].body` of a failed step (cleaned again, `normalizeErrorBody`, when it is read back from a file), and the `error.body` of an attempt of a call record (whose message is kept up to `AI_CALL_ERROR_CHARACTERS`, 2400, with an ellipsis). Every field is optional: an older engine and an older file have none, and read as they did.
|
|
677
|
+
|
|
678
|
+
#### A provider that refuses thinking with tools
|
|
679
|
+
|
|
680
|
+
Some models refuse a thinking level only when the request carries function tools: `Function tools with reasoning_effort are not supported for gpt-6-luna in /v1/chat/completions. To use function tools, use /v1/responses or set reasoning_effort to 'none'.` (a 400, `param: reasoning_effort`). `refusesThinkingWithTools(body)` says whether an answer is that, and it reads the words and the parameter, never the name of the model: a 400 or a 422 that names the level (or whose `param` is it), speaks of tools and says it is refused. The value of a level that is not accepted (`Unsupported value: 'reasoning_effort' does not support 'none' with this model.`), a model that takes no level at all (the remedy of *A provider that does not accept it* below) and any other 400 are not that, and are not asked again.
|
|
681
|
+
|
|
682
|
+
What a model takes with tools differs by family, and the documentation of Azure OpenAI (*Azure OpenAI reasoning models*, «Tool calling with reasoning models») says so: `gpt-5.6-*` take function tools on Chat Completions with the level left out (and still reason) or with `none`; `gpt-6-sol`, `gpt-6-luna` and `gpt-6.1-terra` refuse a request with tools that leaves the level out as well, and take `none` only; `gpt-6-astra`, `gpt-6.1-sol`, `gpt-6.2-astra` and `gpt-6.2-sol` take function tools on the Responses API only, and refuse `none`. The engine finds out which, by asking, and never by the name: the client asks that call again **without the level** (a new attempt of the same candidate; the request that was refused stays in the trail with the provider's words, and `attempt` counts every request), and if that is refused too, **with `none`** (`reasoning_effort: "none"`, for a model that takes its level in `reasoning_effort`); each way once, a way that the first request already was is not asked again, and a refusal of the value of `none` is the end. The error of a call that no way answered is the provider's last words, then what was tried and, when the provider says it, that it takes function tools on `/v1/responses` only: `Narrarium asked again without a thinking level and with "none", and the model still refuses function tools on this endpoint: the provider says to use /v1/responses for them. Set the "API protocol" of the model to "Responses API" in AI Integrations to use them.` Nothing is learned from it: the model needs the Responses API (`apiProtocol: "responses"`; see *API protocol*).
|
|
683
|
+
|
|
684
|
+
When a way answers, the model is remembered by it, once: `AiModelMemory` (`createModelMemory()`) is what a host keeps of its models between calls, given to the client as `options.memory` or per call as `request.memory`, and every later request **with tools** to that model (same integration and model) goes the way that answered from the start (`thinkingMode: "not-sent"` for the level left out, `"none"` for none, and `thinkingWhy: "tools"` in both, with a note in the attempt), while a request **without tools** to the same model keeps its level. `AiChatModelConfig.noThinkingWithTools` is the same fact set by the author: `true` leaves the level out, `"none"` sends `none`; it is read from the configuration (and kept by `pickAiRuntimeConfig`, any other value dropped, and shown by `redactAiRuntimeConfig`), so that no request is wasted to learn it, and what the memory learned (`none`) wins over a `true` that was wrong. `onLearned(learning)` (on the client's options or on the request) says it once, when a call learns it: `{ kind: "no-thinking-with-tools", integrationId, integrationName, model, off, body }` (`off`: `omit` or `none`; `body`: what the provider said the first time). The `AutopilotSession` owns one memory (or takes the host's, `config.memory`) and gives it to every call of its runs: a server-hosted run learns it at once, and `snapshot().learned` lists what the session has learned, for a client that connects later. The runner says it as the `model-learned` event and as an `insight` with the code `modelLearned`, whose words are the provider's, what was done (thinking off for the requests with tools, for this model only; asked with `none` when that is the way) and the two ways out: the Responses API first, when the provider's words tell to use `/v1/responses` (`suggestsResponsesApi`), then turning thinking off, which is what was done. The author's choice of the Responses API is the model's `apiProtocol`, which the host sets (the web app does it with a button of the notice); it is never set by the engine.
|
|
685
|
+
|
|
668
686
|
### Tools only
|
|
669
687
|
|
|
670
688
|
Every autopilot agent answers through a function of its own (the concept, the plan, a reader's evaluation, the director's decisions, the summary of a scene… each has its schema, and the request forces the call with `tool_choice`): the answer is a field that is parsed, not a JSON that the message asked for and that the engine had to find in some text. *Tools only* makes that the only way. It is on unless the configuration turns it off: `AiRuntimeConfig.toolsOnly`, which `pickAiRuntimeConfig` reads from `settings.aiToolsOnly` (and from `toolsOnly` in a configuration that was already picked, which is what a personal server stores and reads back; the settings' own word wins when both are there, and a value that is not a boolean is ignored). A host with no such setting has it on. `redactAiRuntimeConfig(config).toolsOnly` says what is in force.
|
|
@@ -883,6 +901,8 @@ The runner writes one call per `ai()` call of a task: `begin` before the request
|
|
|
883
901
|
- `call-started`: `activityId`, `callId`, `seq` (the call's number in its task, from 1), `label`, `capability`, `structured`, `systemBytes`, `userBytes`.
|
|
884
902
|
- `call-ended`: `activityId`, `callId`, `status` (`ok`, `failed`, `interrupted` or `aborted`), `attempts`, `characters`, `storedBytes`, `partial`, `durationMs`, `dropped` (`limit` or `null`). Neither event carries text.
|
|
885
903
|
- `task-progress` gains `callId` (when the book keeps records) and `callSeq` (always: the call's number in its step, from 1). A structured step that streams its JSON says it with `kind: "json"`, `preview` (the last 700 characters of the JSON so far) and `characters`, and without `bytes`; a shorter JSON (`""` too) is a new attempt, said at once. The numbers event of a structured step keeps its shape (`bytes`, `characters`), with the same `preview` and, once the JSON streams, the JSON's `characters`: the tail, the pace and the count are the call's own, never the ones of the call before. See *The step that is answering* for how a client follows them (`applyLiveProgress`).
|
|
904
|
+
- `call-attempt`: `activityId`, `callSeq`, `callId` (with records), `attempt`, `attempts`, `candidateIndex`, `candidateCount`, `fallback`, `integrationId`, `integrationName`, `provider`, `model`, `thinking`, `thinkingWhy?`, `streamMode`: which candidate of the route the call asks now, said at the start of every attempt, with or without records (see *Which candidate answers*). Names and numbers, never text.
|
|
905
|
+
- `model-learned`: `activityId?`, `learned` (`no-thinking-with-tools`), `integrationId`, `integrationName`, `model`, `off` (`omit` or `none`: the way that answered), `body` (what the provider said, in its own words), `responses` (its words tell to use the Responses API): a call learned from a refusal that the model does not take a thinking level when the request carries tools, was asked again without it (or with `none`), and the session remembers it (see *A provider that refuses thinking with tools*). Kept in the replay of the session; a host that keeps settings persists it as the model's `noThinkingWithTools`. An `insight` with the code `modelLearned` says it in words (it carries the `model`).
|
|
886
906
|
- `insight` with the code `callsStoreFailed`: the store failed or is full (`AiCallDiskFullError`). The run goes on without records until the next run. It is said once per run.
|
|
887
907
|
|
|
888
908
|
The status `aborted` is what a call that the run stopped in the middle of its reply ends as (a «Pause now», or a server stopping), with the text that arrived, `partial` set.
|
package/dist/ai/config.d.ts
CHANGED
|
@@ -1,6 +1,62 @@
|
|
|
1
1
|
export type AiProviderKind = "azure_openai" | "openai" | "github_models" | "m365_copilot";
|
|
2
|
+
/**
|
|
3
|
+
* How a model is asked without thinking when the request carries function tools (`AiChatModelConfig.noThinkingWithTools`): `true` leaves the level out of the request (a model of the GPT-5.6 family still
|
|
4
|
+
* reasons then), `"none"` sends `reasoning_effort: "none"` (the GPT-6 models that take function tools on Chat Completions refuse a request that leaves the level out, and take `none`).
|
|
5
|
+
*/
|
|
6
|
+
export type AiNoThinkingWithTools = true | "none";
|
|
2
7
|
/** The Azure OpenAI API version used when an integration does not name one. */
|
|
3
8
|
export declare const DEFAULT_AZURE_API_VERSION = "2024-10-21";
|
|
9
|
+
/** Whether an endpoint is the v1 API of Azure OpenAI (`https://<resource>.openai.azure.com/openai/v1`), which takes no `api-version` in its address. */
|
|
10
|
+
export declare function isAzureV1Endpoint(endpoint: string | undefined): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* The API version a request to a model is sent with, and the one place that says it (the client, the diagnostics, the editor and the configuration of a personal server all ask here): the
|
|
13
|
+
* model's own (`AiChatModelConfig.apiVersion`), else its integration's, else `DEFAULT_AZURE_API_VERSION`. `v1` for the v1 API of Azure OpenAI, which has none in its address, and
|
|
14
|
+
* `undefined` for a provider that has no API version. Whitespace is no version: an empty field inherits. `model` is the model's entry, or a candidate that carries its `apiVersion`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function effectiveApiVersion(integration: Pick<AiIntegrationConfig, "provider" | "endpoint" | "apiVersion">, model?: {
|
|
17
|
+
apiVersion?: string;
|
|
18
|
+
endpointUrl?: unknown;
|
|
19
|
+
} | null): string | undefined;
|
|
20
|
+
/** The API version of Azure OpenAI that a request to the Responses API carries when neither the model nor its integration names one that the Responses API takes: the one the Azure portal's playground sends. */
|
|
21
|
+
export declare const DEFAULT_AZURE_RESPONSES_API_VERSION = "2025-04-01-preview";
|
|
22
|
+
/** Whether an Azure OpenAI API version can take a request to the Responses API: `v1`, `preview`, or a dated version from 2025-03-01 on. */
|
|
23
|
+
export declare function azureVersionHasResponses(version: string | undefined): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The API version a request to the Responses API of a model is sent with (`effectiveApiVersion` is the one of Chat Completions): `v1` for the v1 API of Azure OpenAI; else the model's own version, which
|
|
26
|
+
* is the author's word for it whatever it is; else its integration's when the Responses API has it (an integration that keeps `2024-10-21` for its Chat Completions models is not made to ask the Responses API
|
|
27
|
+
* with a version that predates it); else `DEFAULT_AZURE_RESPONSES_API_VERSION`. `undefined` for a provider that has no API version. A model with an address of its own (`endpointUrl`) has none: the
|
|
28
|
+
* address says everything.
|
|
29
|
+
*/
|
|
30
|
+
export declare function effectiveResponsesApiVersion(integration: Pick<AiIntegrationConfig, "provider" | "endpoint" | "apiVersion">, model?: {
|
|
31
|
+
apiVersion?: string;
|
|
32
|
+
endpointUrl?: unknown;
|
|
33
|
+
} | null): string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* How the requests of a model are made: `chat-completions` (the default, and what a model that says nothing gets) or `responses`, the Responses API (`/responses`, `input` and `output` items, function tools that work
|
|
36
|
+
* together with reasoning). It is the author's word for the model and is never changed by itself.
|
|
37
|
+
*/
|
|
38
|
+
export declare const AI_API_PROTOCOLS: readonly ["chat-completions", "responses"];
|
|
39
|
+
export type AiApiProtocol = (typeof AI_API_PROTOCOLS)[number];
|
|
40
|
+
/** The protocol a configuration says: `responses` exactly, and nothing for anything else (Chat Completions is what no value means, so the settings of before are the settings they were). */
|
|
41
|
+
export declare function normalizeApiProtocol(value: unknown): "responses" | undefined;
|
|
42
|
+
/** What is wrong with an address typed for a model, or `undefined` when it is fine or empty (no address of its own): it is not an address, it is not http or https, or it carries a user name or a password. */
|
|
43
|
+
export type EndpointUrlProblem = "invalid" | "scheme" | "credentials";
|
|
44
|
+
export declare function endpointUrlProblem(value: unknown): EndpointUrlProblem | undefined;
|
|
45
|
+
/** The address of a model as the engine keeps it: exactly what was written, without the spaces around it, when it is an http or https address with no credentials; nothing for anything else. */
|
|
46
|
+
export declare function normalizeEndpointUrl(value: unknown): string | undefined;
|
|
47
|
+
/** The names of the parameters of the query of an address that look like a key, in the order they are written, each once: the editor warns of them, since the address is saved with the settings and travels to a personal server. */
|
|
48
|
+
export declare function endpointUrlSecretKeys(value: unknown): string[];
|
|
49
|
+
/** Whether the query of an address carries what looks like a key (see `endpointUrlSecretKeys`). */
|
|
50
|
+
export declare function endpointUrlHasSecret(value: unknown): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Where an address goes, and nothing else: its host and its path (`oai-gw.openai.azure.com/openai/responses`), never its query, its fragment or the credentials in it, which is what may be shown and saved about it.
|
|
53
|
+
* `undefined` for anything that is not an http or https address.
|
|
54
|
+
*/
|
|
55
|
+
export declare function describeUrl(value: unknown): string | undefined;
|
|
56
|
+
/** The path of an address, and nothing else (`/openai/responses`): never its query, its fragment or the credentials in it. `undefined` for anything that is not an http or https address, and for an address that has no path. */
|
|
57
|
+
export declare function addressPath(value: unknown): string | undefined;
|
|
58
|
+
/** Whether the path of an address ends with `/responses`: the address of the Responses API, which a model whose address is that is likely to be asked through. */
|
|
59
|
+
export declare function looksLikeResponsesUrl(value: unknown): boolean;
|
|
4
60
|
export interface AiPricingConfig {
|
|
5
61
|
inputPerMTok?: number;
|
|
6
62
|
cachedPerMTok?: number;
|
|
@@ -30,6 +86,30 @@ export interface AiChatModelConfig {
|
|
|
30
86
|
* `suggestedReasoningParameter` says what the documented sources know of a model name; the engine never applies it by itself.
|
|
31
87
|
*/
|
|
32
88
|
reasoningParameter?: AiReasoningParameter;
|
|
89
|
+
/**
|
|
90
|
+
* The model refuses a thinking level when the request carries function tools («Function tools with reasoning_effort are not supported for gpt-6-luna…»): a request with tools is asked without thinking,
|
|
91
|
+
* and a request without tools keeps its level. `true` leaves the level out of the request; `"none"` sends `reasoning_effort: "none"`, for a model that refuses a request with tools that leaves it out
|
|
92
|
+
* (the GPT-6 models that take function tools on Chat Completions do). The author sets it, and the engine learns it from the refusal (`AiModelMemory`) when the provider says so. Any other value is no value.
|
|
93
|
+
* It is a rule of Chat Completions: a model asked through the Responses API (`apiProtocol`) is sent its level with tools, whatever this says.
|
|
94
|
+
*/
|
|
95
|
+
noThinkingWithTools?: AiNoThinkingWithTools;
|
|
96
|
+
/**
|
|
97
|
+
* The API version this model's requests carry (Azure OpenAI's `api-version`): each deployment may need its own. Absent or empty: the integration's `apiVersion`, else
|
|
98
|
+
* `DEFAULT_AZURE_API_VERSION`. `effectiveApiVersion` is the one place that says which is used; it only has an effect for an Azure OpenAI integration.
|
|
99
|
+
*/
|
|
100
|
+
apiVersion?: string;
|
|
101
|
+
/**
|
|
102
|
+
* How this model's requests are made (`AI_API_PROTOCOLS`): absent or `chat-completions`, Chat Completions, as always; `responses`, the Responses API. The key of the integration is sent the way its provider
|
|
103
|
+
* takes it (the `api-key` header of Azure OpenAI, a bearer token for the others), whichever protocol it is. With the Responses API a thinking level and function tools work together, so `noThinkingWithTools` is not used,
|
|
104
|
+
* and its one field for the level (`reasoning.effort`) leaves the chat-template parameter of `reasoningParameter` without a use.
|
|
105
|
+
*/
|
|
106
|
+
apiProtocol?: AiApiProtocol;
|
|
107
|
+
/**
|
|
108
|
+
* The address this model's requests go to, used exactly as it was written (its query included): for a gateway whose address is not the one the engine would build from the integration. It has to be an http or
|
|
109
|
+
* https address with no user name or password in it; anything else is no value. It is the address of the request, not a base: `…/openai/responses?api-version=2025-04-01-preview`. The API version of the
|
|
110
|
+
* model and of its integration are not used for it. The key of the integration is sent as ever. Do not put a key in it: it is saved with the settings, and travels to a personal server.
|
|
111
|
+
*/
|
|
112
|
+
endpointUrl?: string;
|
|
33
113
|
/** The context window of the model: what a prompt and its answer may be together. The engine subtracts the answer and a margin itself. */
|
|
34
114
|
maxInputTokens?: number;
|
|
35
115
|
/** The largest answer that can be asked of the model. */
|
|
@@ -71,6 +151,7 @@ export interface AiIntegrationConfig {
|
|
|
71
151
|
provider: AiProviderKind;
|
|
72
152
|
endpoint?: string;
|
|
73
153
|
apiKey: string;
|
|
154
|
+
/** The API version of the integration's models that do not name their own (`AiChatModelConfig.apiVersion`): Azure OpenAI's `api-version`. Absent: `DEFAULT_AZURE_API_VERSION`. */
|
|
74
155
|
apiVersion?: string;
|
|
75
156
|
/**
|
|
76
157
|
* How long the provider has to begin answering (the connection and the headers), as the author wrote it. A call raises a value
|
|
@@ -152,6 +233,8 @@ export interface RedactedAiIntegration {
|
|
|
152
233
|
streamMode?: AiStreamMode;
|
|
153
234
|
/** The thinking level of the integration, when it sets one. */
|
|
154
235
|
thinking?: AiThinking;
|
|
236
|
+
/** The API version of the integration (Azure OpenAI), when it names one: the default of its models that do not name their own. */
|
|
237
|
+
apiVersion?: string;
|
|
155
238
|
models: RedactedAiModel[];
|
|
156
239
|
}
|
|
157
240
|
/** A model as the safe view shows it: its name and routes, and what its configuration declares of it (only what it declares). */
|
|
@@ -164,6 +247,14 @@ export interface RedactedAiModel {
|
|
|
164
247
|
supportsVision?: boolean;
|
|
165
248
|
/** How the thinking level reaches the model, when the model says (absent: `reasoning_effort`). */
|
|
166
249
|
reasoningParameter?: AiReasoningParameter;
|
|
250
|
+
/** Whether the model refuses thinking when the request carries tools, and how it is asked then (see `AiChatModelConfig.noThinkingWithTools`); absent: it does not, as far as is known. */
|
|
251
|
+
noThinkingWithTools?: AiNoThinkingWithTools;
|
|
252
|
+
/** The API version of the model, when it names its own (Azure OpenAI): absent, it takes the integration's. */
|
|
253
|
+
apiVersion?: string;
|
|
254
|
+
/** The Responses API, when the model is asked through it (absent: Chat Completions). */
|
|
255
|
+
apiProtocol?: "responses";
|
|
256
|
+
/** Where the model's requests go, when it has an address of its own: its host and its path, never its query (which may hold a key) or credentials. */
|
|
257
|
+
endpointUrl?: string;
|
|
167
258
|
maxInputTokens?: number;
|
|
168
259
|
maxOutputTokens?: number;
|
|
169
260
|
}
|
package/dist/ai/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/ai/config.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG,QAAQ,GAAG,eAAe,GAAG,cAAc,CAAC;AAE1F,+EAA+E;AAC/E,eAAO,MAAM,yBAAyB,eAAe,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI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BAAqB,EAAE,CAAC;CACpC;AAED,oEAAoE;AACpE,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,qBAAqB,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,sGAAsG;IACtG,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IACjD,qFAAqF;IACrF,SAAS,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;IAC1C,gBAAgB,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAChD;AAsCD,4DAA4D;AAC5D,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,eAAe,GAAG,uBAAuB,CA4BtF"}
|
package/dist/ai/config.js
CHANGED
|
@@ -1,5 +1,146 @@
|
|
|
1
1
|
/** The Azure OpenAI API version used when an integration does not name one. */
|
|
2
2
|
export const DEFAULT_AZURE_API_VERSION = "2024-10-21";
|
|
3
|
+
/** Whether an endpoint is the v1 API of Azure OpenAI (`https://<resource>.openai.azure.com/openai/v1`), which takes no `api-version` in its address. */
|
|
4
|
+
export function isAzureV1Endpoint(endpoint) {
|
|
5
|
+
return /\/openai\/v1$/i.test((endpoint ?? "").trim().replace(/\/+$/, ""));
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The API version a request to a model is sent with, and the one place that says it (the client, the diagnostics, the editor and the configuration of a personal server all ask here): the
|
|
9
|
+
* model's own (`AiChatModelConfig.apiVersion`), else its integration's, else `DEFAULT_AZURE_API_VERSION`. `v1` for the v1 API of Azure OpenAI, which has none in its address, and
|
|
10
|
+
* `undefined` for a provider that has no API version. Whitespace is no version: an empty field inherits. `model` is the model's entry, or a candidate that carries its `apiVersion`.
|
|
11
|
+
*/
|
|
12
|
+
export function effectiveApiVersion(integration, model) {
|
|
13
|
+
if (integration.provider !== "azure_openai")
|
|
14
|
+
return undefined;
|
|
15
|
+
// A model with an address of its own is sent where the address says, with no version of ours.
|
|
16
|
+
if (normalizeEndpointUrl(model?.endpointUrl))
|
|
17
|
+
return undefined;
|
|
18
|
+
if (isAzureV1Endpoint(integration.endpoint))
|
|
19
|
+
return "v1";
|
|
20
|
+
const own = typeof model?.apiVersion === "string" ? model.apiVersion.trim() : "";
|
|
21
|
+
const inherited = typeof integration.apiVersion === "string" ? integration.apiVersion.trim() : "";
|
|
22
|
+
return own || inherited || DEFAULT_AZURE_API_VERSION;
|
|
23
|
+
}
|
|
24
|
+
/** The API version of Azure OpenAI that a request to the Responses API carries when neither the model nor its integration names one that the Responses API takes: the one the Azure portal's playground sends. */
|
|
25
|
+
export const DEFAULT_AZURE_RESPONSES_API_VERSION = "2025-04-01-preview";
|
|
26
|
+
/** The first dated API version of Azure OpenAI that has the Responses API: an older one cannot take a request to it. */
|
|
27
|
+
const FIRST_RESPONSES_API_VERSION = "2025-03-01";
|
|
28
|
+
/** Whether an Azure OpenAI API version can take a request to the Responses API: `v1`, `preview`, or a dated version from 2025-03-01 on. */
|
|
29
|
+
export function azureVersionHasResponses(version) {
|
|
30
|
+
const value = (version ?? "").trim();
|
|
31
|
+
if (!value)
|
|
32
|
+
return false;
|
|
33
|
+
if (/^(?:v1|preview)$/i.test(value))
|
|
34
|
+
return true;
|
|
35
|
+
return /^\d{4}-\d{2}-\d{2}/.test(value) && value.slice(0, 10) >= FIRST_RESPONSES_API_VERSION;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The API version a request to the Responses API of a model is sent with (`effectiveApiVersion` is the one of Chat Completions): `v1` for the v1 API of Azure OpenAI; else the model's own version, which
|
|
39
|
+
* is the author's word for it whatever it is; else its integration's when the Responses API has it (an integration that keeps `2024-10-21` for its Chat Completions models is not made to ask the Responses API
|
|
40
|
+
* with a version that predates it); else `DEFAULT_AZURE_RESPONSES_API_VERSION`. `undefined` for a provider that has no API version. A model with an address of its own (`endpointUrl`) has none: the
|
|
41
|
+
* address says everything.
|
|
42
|
+
*/
|
|
43
|
+
export function effectiveResponsesApiVersion(integration, model) {
|
|
44
|
+
if (integration.provider !== "azure_openai")
|
|
45
|
+
return undefined;
|
|
46
|
+
if (normalizeEndpointUrl(model?.endpointUrl))
|
|
47
|
+
return undefined;
|
|
48
|
+
if (isAzureV1Endpoint(integration.endpoint))
|
|
49
|
+
return "v1";
|
|
50
|
+
const own = typeof model?.apiVersion === "string" ? model.apiVersion.trim() : "";
|
|
51
|
+
const inherited = typeof integration.apiVersion === "string" ? integration.apiVersion.trim() : "";
|
|
52
|
+
return own || (azureVersionHasResponses(inherited) ? inherited : DEFAULT_AZURE_RESPONSES_API_VERSION);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* How the requests of a model are made: `chat-completions` (the default, and what a model that says nothing gets) or `responses`, the Responses API (`/responses`, `input` and `output` items, function tools that work
|
|
56
|
+
* together with reasoning). It is the author's word for the model and is never changed by itself.
|
|
57
|
+
*/
|
|
58
|
+
export const AI_API_PROTOCOLS = ["chat-completions", "responses"];
|
|
59
|
+
/** The protocol a configuration says: `responses` exactly, and nothing for anything else (Chat Completions is what no value means, so the settings of before are the settings they were). */
|
|
60
|
+
export function normalizeApiProtocol(value) {
|
|
61
|
+
return value === "responses" ? "responses" : undefined;
|
|
62
|
+
}
|
|
63
|
+
export function endpointUrlProblem(value) {
|
|
64
|
+
const written = typeof value === "string" ? value.trim() : "";
|
|
65
|
+
if (!written)
|
|
66
|
+
return undefined;
|
|
67
|
+
let url;
|
|
68
|
+
try {
|
|
69
|
+
url = new URL(written);
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return "invalid";
|
|
73
|
+
}
|
|
74
|
+
if (url.protocol !== "http:" && url.protocol !== "https:")
|
|
75
|
+
return "scheme";
|
|
76
|
+
if (url.username || url.password)
|
|
77
|
+
return "credentials";
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
/** The address of a model as the engine keeps it: exactly what was written, without the spaces around it, when it is an http or https address with no credentials; nothing for anything else. */
|
|
81
|
+
export function normalizeEndpointUrl(value) {
|
|
82
|
+
const written = typeof value === "string" ? value.trim() : "";
|
|
83
|
+
return written && !endpointUrlProblem(written) ? written : undefined;
|
|
84
|
+
}
|
|
85
|
+
/** The query keys that carry a secret in the addresses of some gateways (`?key=`, `?api-key=`, `?sig=`, `?code=`, `?token=`). */
|
|
86
|
+
const SECRET_QUERY_KEY = /^(?:key|api[-_]?key|apikey|token|access[-_]?token|auth|authorization|sig|signature|sas|secret|password|pwd|code)$/i;
|
|
87
|
+
/** The names of the parameters of the query of an address that look like a key, in the order they are written, each once: the editor warns of them, since the address is saved with the settings and travels to a personal server. */
|
|
88
|
+
export function endpointUrlSecretKeys(value) {
|
|
89
|
+
if (typeof value !== "string" || endpointUrlProblem(value))
|
|
90
|
+
return [];
|
|
91
|
+
const names = [];
|
|
92
|
+
try {
|
|
93
|
+
new URL(value.trim()).searchParams.forEach((_value, name) => {
|
|
94
|
+
if (SECRET_QUERY_KEY.test(name) && !names.includes(name))
|
|
95
|
+
names.push(name);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
return [];
|
|
100
|
+
}
|
|
101
|
+
return names;
|
|
102
|
+
}
|
|
103
|
+
/** Whether the query of an address carries what looks like a key (see `endpointUrlSecretKeys`). */
|
|
104
|
+
export function endpointUrlHasSecret(value) {
|
|
105
|
+
return endpointUrlSecretKeys(value).length > 0;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Where an address goes, and nothing else: its host and its path (`oai-gw.openai.azure.com/openai/responses`), never its query, its fragment or the credentials in it, which is what may be shown and saved about it.
|
|
109
|
+
* `undefined` for anything that is not an http or https address.
|
|
110
|
+
*/
|
|
111
|
+
export function describeUrl(value) {
|
|
112
|
+
if (typeof value !== "string" || endpointUrlProblem(value) || !value.trim())
|
|
113
|
+
return undefined;
|
|
114
|
+
try {
|
|
115
|
+
const url = new URL(value.trim());
|
|
116
|
+
return `${url.host}${url.pathname.replace(/\/+$/, "")}`;
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
return undefined;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/** The path of an address, and nothing else (`/openai/responses`): never its query, its fragment or the credentials in it. `undefined` for anything that is not an http or https address, and for an address that has no path. */
|
|
123
|
+
export function addressPath(value) {
|
|
124
|
+
if (typeof value !== "string" || endpointUrlProblem(value) || !value.trim())
|
|
125
|
+
return undefined;
|
|
126
|
+
try {
|
|
127
|
+
return new URL(value.trim()).pathname.replace(/\/+$/, "") || undefined;
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
return undefined;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/** Whether the path of an address ends with `/responses`: the address of the Responses API, which a model whose address is that is likely to be asked through. */
|
|
134
|
+
export function looksLikeResponsesUrl(value) {
|
|
135
|
+
if (typeof value !== "string" || endpointUrlProblem(value) || !value.trim())
|
|
136
|
+
return false;
|
|
137
|
+
try {
|
|
138
|
+
return /\/responses$/i.test(new URL(value.trim()).pathname.replace(/\/+$/, ""));
|
|
139
|
+
}
|
|
140
|
+
catch {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
3
144
|
/**
|
|
4
145
|
* How hard a model is asked to think, per integration and per route target. `low`, `medium`, `high` and `xhigh` are sent to the provider as
|
|
5
146
|
* `reasoning_effort` (or as the argument of the chat template that the model's `reasoningParameter` says); `automatic` sends nothing (the provider's
|
|
@@ -111,6 +252,10 @@ export function pickAiRuntimeConfig(settings) {
|
|
|
111
252
|
...(typeof model.supportsReasoning === "boolean" ? { supportsReasoning: model.supportsReasoning } : {}),
|
|
112
253
|
...(typeof model.supportsVision === "boolean" ? { supportsVision: model.supportsVision } : {}),
|
|
113
254
|
...reasoningParameterOf(model.reasoningParameter),
|
|
255
|
+
...(model.noThinkingWithTools === true || model.noThinkingWithTools === "none" ? { noThinkingWithTools: model.noThinkingWithTools } : {}),
|
|
256
|
+
...(text(model.apiVersion) ? { apiVersion: text(model.apiVersion) } : {}),
|
|
257
|
+
...(normalizeApiProtocol(model.apiProtocol) ? { apiProtocol: normalizeApiProtocol(model.apiProtocol) } : {}),
|
|
258
|
+
...(normalizeEndpointUrl(model.endpointUrl) ? { endpointUrl: normalizeEndpointUrl(model.endpointUrl) } : {}),
|
|
114
259
|
maxInputTokens: positive(model.maxInputTokens),
|
|
115
260
|
maxOutputTokens: positive(model.maxOutputTokens),
|
|
116
261
|
pricing: pricing(model.pricing),
|
|
@@ -181,6 +326,10 @@ function redactedModel(model) {
|
|
|
181
326
|
...(supportsReasoning !== undefined ? { supportsReasoning } : {}),
|
|
182
327
|
...(supportsVision !== undefined ? { supportsVision } : {}),
|
|
183
328
|
...reasoningParameterOf(model.reasoningParameter),
|
|
329
|
+
...(model.noThinkingWithTools === true || model.noThinkingWithTools === "none" ? { noThinkingWithTools: model.noThinkingWithTools } : {}),
|
|
330
|
+
...(text(model.apiVersion) ? { apiVersion: text(model.apiVersion) } : {}),
|
|
331
|
+
...(normalizeApiProtocol(model.apiProtocol) ? { apiProtocol: "responses" } : {}),
|
|
332
|
+
...(describeUrl(model.endpointUrl) ? { endpointUrl: describeUrl(model.endpointUrl) } : {}),
|
|
184
333
|
...(maxInputTokens !== undefined ? { maxInputTokens } : {}),
|
|
185
334
|
...(maxOutputTokens !== undefined ? { maxOutputTokens } : {}),
|
|
186
335
|
};
|
|
@@ -209,6 +358,7 @@ export function redactAiRuntimeConfig(config) {
|
|
|
209
358
|
...(integration.idleTimeoutMs !== undefined ? { idleTimeoutMs: integration.idleTimeoutMs } : {}),
|
|
210
359
|
...(integration.streamMode ? { streamMode: integration.streamMode } : {}),
|
|
211
360
|
...(thinking ? { thinking } : {}),
|
|
361
|
+
...(text(integration.apiVersion) ? { apiVersion: text(integration.apiVersion) } : {}),
|
|
212
362
|
models: (integration.chatModels ?? []).map(redactedModel),
|
|
213
363
|
};
|
|
214
364
|
}),
|
package/dist/ai/config.js.map
CHANGED
|
@@ -1 +1 @@
|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