Repository navigation
Release 0.8.17: Luna retry and a clear unavailable-model message; tokens and cost under each reply - #585
Merged
Conversation
…p-after-v0.8.16 chore: sync develop with main after v0.8.16
* Shorten the NEMAR notebook welcome and say where the code runs Retitle the starter as a Python playground, state that code, edits and results stay on the reader's machine while data streams in, name what eegprep-lean does and does not do yet, and note that MNE does not install in this Pyodide 0.29.5 runtime. Tested: starter, notebook-lock and notebook-site tests pass. * Give NEMAR's spectra and ERP images a curated first plot Set the PSD y-limits and the ERP image color range before drawing, sort ERP image rows (by response time, or by response amplitude) and then smooth them, say how rows are ordered and offer one other sort, and describe the structure a plot shows rather than calling the recording noise. The first figure is the one an expert would expect. Tested: NEMAR prompt, config and runtime tests pass; the plots themselves are not yet checked against a live recording. * Address PR review: scope the MNE claim, tighten the plot guidance Notebook: say the latest MNE does not install (an older release does), use the package's own name for eegprep-lean, define ERP and ICLabel where first used and once only, and restore the setup cell's Ready instruction. Prompt: log y-axis and a top limit that keeps named peaks, response_time read from columns_summary in seconds with paired-copy length assert, the first response within the epoch, 'order' instead of 'sort' to avoid the pinned events rule, an amplitude ordering described as imposed structure, and no blanket ban on the word noise. Tested: 943 Python tests, notebook/test-open.js and frontend/test-data-lane.js pass.
…s unavailable (#581) * fix: classify urllib3 errors from a Bedrock stream as model failures A Bedrock stream that stalled past the read timeout surfaced as urllib3's ReadTimeoutError, which botocore lets out raw while iterating the response. classify_model_error only knew botocore's class, so the failure was logged as an unexpected error with no retryable field (issue 578). urllib3 timeouts and protocol errors are now the model call's when they came up through botocore. Tested: new cases drive the real Bedrock client with a staged stream that raises mid-body; they fail without the change. test_model_errors.py passes. * feat: retry a model call once when it fails fast before any output Bedrock can end a stream almost at once with no messageStop event (GPT-6 Luna did, issue 578) or answer a throttle; botocore does not retry once the response has begun, so each reached the reader as an error. The ask and chat streams now run the graph once more when the failure can clear by itself and fails fast, and only while the reader has seen no text, tool call or tool result and no model call has finished. A read timeout is not retried, since it has already spent the whole timeout. Tested: real graph and real Bedrock client with staged streams, on both endpoints; the retry tests and the no-retry guards fail when the change or the guard is removed. test_stream_failures.py and test_model_errors.py pass. * feat: tell the reader their model is unavailable and to choose another When a model call fails in a way that can clear by itself (throttle, stream cut short, stall, dropped connection) and the retry did not help, the reader got "An error occurred while processing your request." The error event now says the current model is not available and asks them to choose another. There is no automatic switch, which would change what a community chose and what a request costs. Failures that are not a model call's (a tool of ours) keep the generic text, and a refused request or credential keeps its own. Tested: the provider-failure cases in test_stream_failures.py now assert the new text on both endpoints, the generic text is still asserted for non-model failures; 149 pass across test_stream_failures.py and test_model_errors.py. * fix: bound the retry, skip throttles, and report that it happened Review findings on the retry: - retry only a failure that arrives within 10 s, so a slow failure does not double the reader's wait; wait a jittered second, not a fixed one - retry only unavailable and connection failures; a throttle is already retried with backoff by the clients, and a second try only adds load - match urllib3 errors only when they came up through langchain-aws, and name urllib3 in the detail so it is not confused with botocore's class - treat a chunk it does not recognize as output, close the inner stream deterministically, and log a cancel during the wait - log the first failure's type, kind and text, the chat session, and when the second try worked; a failure that survived a retry is logged at ERROR and its metrics detail says so - correct docstrings the review found stale or inaccurate Tested: new cases for the window, the throttle exclusion, a dropped connection, the ERROR record, cancellation during the wait, and what counts as output; the window and throttle cases fail when their change is removed. 524 pass across the affected test files. * docs: add the issue 578 changes to the changelog * refactor: simplify the retry helper and share test fixtures - the retry outcome is a required argument and the single record of whether a second try was made; the failure detail's retried flag has no default - one traceback-frame check serves both _raised_in and _passed_through - the wording branch reads as one conditional; trim docstrings that repeated each other - tests: typed staged answers (a misspelled key now fails), shared CUT_SHORT and dropped/stalled stream errors, one real-client helper for the classifier tests, one retry-log filter, and the unrecognized-wording constant renamed to match its field Tested: 1706 pass across test_stream_failures.py and tests/test_core; ruff clean. * test: cover the retry end to end on the paths the review found open - a service error inside a Bedrock stream, OpenRouter 503, and an Anthropic overloaded error are answered by the second try; a throttle (in-stream and OpenRouter) is left alone, as decided - the resume path sends the same request twice, carrying the browser's result, and labels the retry with its own endpoint - a provider failure nobody recognizes is called unavailable and claims nothing about retrying; one that survives a retry is logged at ERROR - each kind of output (a tool call alone, reasoning alone, a tool after a model that does not stream) ends the chance to retry - a disconnect during the wait releases the session's turn and starts no second call; a urllib3 error through botocore alone is not the model's - the retry log is found by its own field, and the unbounded-retry case fails fast instead of hanging Tested: 1727 pass (11 skipped) across tests/test_core and test_stream_failures.py; the langchain-aws requirement and the earlier guards fail when removed. * fix: make the retry report write-only and true for the failure it labels Type design review findings on RetryOutcome: - the helper read its caller's out-parameter as control state, so an instance that was reused skipped the retry and logged a success that never happened; it now keeps its own local state and only writes the report - the flag was sticky, so a later, unrelated failure in a run that had been retried was logged at ERROR as "after one retry"; it is now set only when the failure raised came from the second try before that try produced any output - renamed RetryOutcome to RetryState (outcome collides with the model_outcome and turn_outcome modules) and its field to failed_after_retry - tests: the classifier's tables are walked to keep kind and retryable consistent, and every kind is covered by the retry-policy cases; the wire helper's defaults are defined once and its docstring says its answers are indexed by transport request - docstrings: worth_retrying_now reflowed and tied to retryable; _FailureWording says it holds the two messages that differ by stream Tested: 1737 pass (11 skipped) across tests/test_core and test_stream_failures.py; the reuse and per-failure label tests fail when their change is removed.
* feat: report tokens, cache use and estimated cost with each reply The streams and the request metrics already count every request's tokens and price them; the reader never saw any of it. The done event of /ask and /chat, the tool_request event that ends a browser-execution run, and the responses to requests that are not streamed now carry a usage object: input, output, cache read and cache write tokens, and an estimated cost in USD from the price table. It is null when the provider reported no usage (not a free reply) and for models OSA does not offer itself, which leaves OpenRouter out for now. Refs #582. Tested: new tests drive the real streams and graph for Bedrock and Anthropic through scripted adapter chunks, with the cost worked out by hand; the API tests fail when the wiring is removed. tests/test_api (minus the known chat-resume 401s) and tests/test_metrics pass. * feat: print what a reply used under it in the CLI osa ask and osa chat, streamed and not, print one line under the answer from the usage object the server now sends, for example "1,240 in (980 cached), 310 out, about $0.0021". It goes to stderr, so stdout stays the answer alone for a pipe, and is left out when the server sent none. The wording is tested against a table shared with the widget. Refs #582. Tested: respx-staged streams and responses through the real client; the four printing tests fail without the change. tests/test_cli passes (177). * feat: show what a reply used and cost under it in the widget The widget reads the usage object from a reply's done event and shows one line under the reply, between its sources and the feedback buttons, for example "1,240 in (980 cached), 310 out, about $0.0021". A reply that runs code in the browser spans several runs: the earlier runs' usage is kept aside from their tool_request events and added to the last run's on done, so the line appears once the reply is whole and shows the sum. The message keeps it, so a reload shows it again. The wording is tested against the table the CLI uses. Refs #582. Tested: unit cases for the line, the sum and the done reducer in test-streaming.js (99); DOM cases in test-widget-paced-streaming.js for a single run, no usage, and a two-run reply (266); the render fails the DOM test when removed. Every other widget suite and the Python frontend guard tests pass. * fix: a bad token count must not cost the reader the answer The usage object is built inside the done event. A count a provider reported badly would have raised there and ended the stream with an error, after the answer was written. It now logs a warning and sends no usage, as _extract_token_usage does for the metrics. Refs #582. Tested: a fractional token count, which pydantic rejects, gives no usage and one warning. tests/test_api/test_reply_usage.py passes (16). * fix: say when a reply's usage leaves a run out, and tighten what usage can be Review findings on the usage display: - a reply some of whose model runs reported no tokens showed the others' figures as its total. The server now sends partial, the widget notices a missing run on either side of a sum, and both the widget and the CLI say "at least" - ReplyUsage refuses negative counts, a negative or non-finite cost, and cached tokens above the input (an adapter counting the way Anthropic's own API does) instead of showing a wrong figure; the failure is logged at WARNING with the counts and ids, and any other failure at ERROR - the widget and the CLI print identical cost text for every whole micro-dollar from 0 to 3,000,000 (checked), where toFixed and Python's formatter rounded ties differently; ties and non-ties are rows of the shared table - the widget shows usage from a response that is not streamed, keeps only the fields it reads from the server and from saved history, and reports an unreadable usage once on the console (the CLI at debug level) - the tool_request contract (ToolRequestEvent, to_request_event) carries usage - documented: usage is per run on a stream, null for OpenRouter-routed requests (pinned to the OpenRouter slugs), cache writes are priced at the five-minute rate, and a failed attempt's tokens are not counted Refs #582. Tested: 3440 Python tests pass in tests/test_api, test_metrics, test_cli, test_core and test_frontend (19 chat-resume failures, identical on develop); every widget suite passes (test-streaming 115, paced-streaming 278); the partial and missing-first-run handling fail when removed. * refactor: simplify the usage display and make the CLI as strict as the widget - the router's three helpers take their counts by keyword and decide partial in one place; the non-streaming helper takes the request like its neighbors - the widget cleans a usage once and draws from the clean object, with the console warning at the one place untrusted data enters (so it is a real path, not only a test hook); _runs is _usageRuns - the CLI treats a negative count, and a negative or non-finite cost, the way the widget does (a NaN cost no longer crashes it after the answer is printed); the shared table gained rows that pin it - both cost formatters use the same if/elif chain and digit arithmetic, and still print identical text for every whole micro-dollar from 0 to 3,000,000 - tests: shared serve and ask helpers, imports hoisted, the fixture row looked up by name Refs #582. Tested: 253 usage tests pass (API, metrics, CLI) and every widget suite passes (test-streaming 121, paced-streaming 279); the Python and JS cost text was compared across 3,000,001 values. * test: pin the usage paths the coverage review found open - cache reads and writes in their own fields on the ask stream, the chat stream, the tool_request event and both non-streaming responses (a swap of the two passed the suite), including the per-lifetime cache write the real Anthropic adapter reports - /chat/resume run 2 reports its own usage, not run 1's added, through the real endpoints - a reply that was tried again reports the second try's usage, with the cache fields the real Bedrock stream parser gives, and agrees with the request's row in the metrics - the widget's own saved history round-trips usage, and a reply whose second run failed saves nothing kept aside between runs - reply_usage keeps a run with only input or only output; the CLI is tested against a server that sends no usage key, and its batch paths against stdout and stderr separately; the test cost uses the module's cache multipliers Refs #582. Tested: 373 Python usage tests pass and every widget suite passes (paced-streaming 283); five mutants (swapped cache fields in three places, the zero gate, a saved-history leak) each fail a test.
…gins (#584) The Unreleased section becomes 0.8.17, as the changelog's instructions say for a release, with a new empty Unreleased above it. The NWB documentation preview origins (#579) had no entry; they do now. Not code: the changelog only. Tested: the changelog renders as before and test_frontend_job_parity and the docs tests are unaffected.
Contributor
Preview Deployment
This preview will be updated automatically when you push new commits. |
…log outages as outages (#588) * fix: retry only what came after the response began, and report outages as outages Release review round 1 on #585: - the retry covered a failure before the response began, which botocore and the Anthropic SDK had already retried with backoff, so an outage could cost four to six calls per request; ModelFailure now says mid_stream (an exception event inside a stream, a stream ended with no messageStop, a dropped connection, an error event in a 200 stream) and only those are retried - a failure that was worth a retry and reached the reader anyway is logged at ERROR; it was a warning for a reply that had used a tool and an error for one that had not - bad token counts log one line with no traceback; a price-table defect logs at ERROR; a throttle on the caller's own key says the key is rate limited - the cancel log names the model, session and failure kind - the cost line rounded up to a cent or a dollar kept one decimal too many ($0.0100, $1.000); both formatters now judge the tier after rounding, and still print identical text for every whole micro-dollar from 0 to 3,000,000 - print_error escapes its message, since a model name with a bracket raised - tests: retried failures are staged as in-stream errors, with a control that the same failure with no output is retried, request counts for a refused Bedrock request, usage and partial after a retry, and a cancel test that waits for the retry instead of a fixed sleep Refs #578, #582. Tested: 3494 Python tests pass across test_api, test_metrics, test_cli, test_core and test_frontend (the 19 chat-resume 401s fail identically on develop, and tests/test_core/test_tagged_citations.py's reading-time test is flaky on develop too); every widget suite passes. * docs: make the 0.8.17 changelog match the code after review Both old error strings, the mid-stream scope of the retry, which clients retry throttles, one develop stall and not a production one, -o json, the NEMAR rule as the prompt states it, and that the wording and retry are for streamed replies. Not code: the changelog only. * docs: say which readers see the stall message The widget aborts its request at 120 s, which fires before Bedrock's 120 s read timeout (counted from the last byte), so a widget reader sees Connection timeout and an API or CLI client sees the unavailable message. Not code: the changelog only.
neuromechanist
temporarily deployed
to
testpypi
October 7, 2026 01:55 — with
GitHub Actions
Inactive
It runs inside the handlers that report a failure, so an exception from it cut the stream with no error event, log line or metrics row. An error it cannot read is now unknown and the reason is logged. Also corrects the wording of three comments about the httpx fork the Anthropic SDK depends on, and the throttle reasoning in worth_retrying_now. Tested: tests/test_core/test_model_errors.py (new TestItNeverRaises cases).
A failure that surfaced as the stream was closed (GeneratorExit at the yield) started a second model call nobody would read. The retry helper now notes the close and re-raises. Also spells canceling the American way in a test name. Tested: new TestTheReaderClosesTheStream fails without the guard and passes with it.
…st both fail A check on the whole object has no field, so its line read "(: ..."; it now says "usage". Counts that also make the cost invalid are the provider's, so they log at WARNING, and only a cost-only failure (a price table defect) logs at ERROR. Tested: tests/test_api/test_reply_usage.py (TestWhatTheOperatorReads).
An outage before the response began, or a read that timed out, was a WARNING while the same outage mid-stream was an ERROR, so an alert on ERROR saw only some requests. Unavailable, connection and timeout failures from a provider are now ERROR (without a traceback unless a retry would have covered it); throttles and the caller's own refused key stay WARNING. Tested: tests/test_api/test_stream_failures.py asserts the level per phase.
The CLI and the widget printed any finite cost; a corrupt figure (1e305) filled the line. Both now treat a cost at or above one billion dollars as no cost. The CLI's print_error and print_warning also accept a message that is not a string. Tested: shared table row in tests/fixtures/usage_lines.json (Python and widget), print_error(None) in tests/test_cli/test_main.py.
AbortSignal.timeout aborts with a TimeoutError, not the AbortError the widget checked for, so a stalled request fell through to the generic failure text. Both names now read as the request timeout, streamed and not streamed. Tested: new block in frontend/test-widget-paced-streaming.js (287 checks pass).
Without the half-up step, 31 of the 3,000,001 whole micro-dollar values print differently, and none was in the shared table. Adds rows for three of them and for the edges at $0.0001, $0.01 and $1. Tested: Python and widget suites; mutants without the half-up step and with the under-$0.0001 edge moved fail both.
classify_model_error reads mid_stream from the error it found, not the wrapper; no test would have noticed the wrapper being read instead. Tested: the new case fails with the wrapper read and passes as written.
Tested: tests/test_api/test_reply_usage.py; the any-for-all mutant fails.
…lure tests - log level and traceback of a failure that was worth a retry but came too late or after a tool, and of an OpenRouter outage before the response - a community key's throttle is not called the reader's, and another failure on the reader's key is not called a throttle - the cancel log names the session - an Anthropic stream lost inside the SDK's own httpx is retried end to end - every streamed turn has a 60 s deadline so a retry loop fails instead of hanging, and the cancel tests poll for 30 s - botocore's backoff sleep is skipped (the file ran 29 s and now runs about 10 s; the requests are still made and counted) Tested: tests/test_api/test_stream_failures.py, 121 pass; each new assertion fails against a mutant of the code it guards.
Outage logging at ERROR in every phase, the widget's own request timeout, the CLI and cost hardening, the classifier that cannot raise, and the stream the reader closes. Docs only; the code and tests are in the commits before it.
…try a canceled task A failure that landed as the reader closed the stream was re-raised into a task nobody awaits, so the only trace was asyncio's "Task exception was never retrieved" with no request context; the helper now logs it with the endpoint, model, request and session. A task canceled while the model's stream is open can end in the stream's own failure in place of the CancelledError; the helper treated that as an ordinary failure and retried. It now checks the task's cancelling() count as well as the close. Tested: two new tests in TestTheReaderClosesTheStream; each fails without its guard.
… error once One unreadable link (a wrapper whose __str__ raises) aborted the walk, so a readable cause behind it (a throttle) came out unknown. A failure to say where a failure came from discarded a known kind. The handlers that each classify one failure also logged an unclassifiable one once each; it is now logged once per exception. Adds exception_text, str() with a placeholder, for the log lines that report a failure. Also states that the errors OpenRouter raises in a stream carry no status, instead of "never" marked. Tested: tests/test_core/test_model_errors.py; the dedupe and the per-link isolation each fail a test without them.
…ep a traceback The docstring's colon list named the cases that get a traceback but read as examples of the exception, omitted the caller's-key throttle wording, and ended in a ragged line; after_retry keeps the traceback rather than raising the level, and the comment above needs_traceback described the level. Comments only.
A __str__ that raises dropped the logging module's line (it prints "--- Logging error ---" and moves on), leaving the reader's error id matching nothing, and cut the stream in the ValueError branches that put str(e) in the message. The failure line and those messages now carry exception_text. Tested: new test in tests/test_api/test_stream_failures.py; fails with the raw error in the line.
data.get("message", default) keeps an explicit null, so the CLI printed "Error: None".
Also lets the error and warning printers take a message that is not a string.
Tested: two new stream tests in tests/test_cli/test_main.py; both fail with the old
fallback.
Tested: tests/test_cli (the config reset test reads the message).
The comment said Python's integer arithmetic could not take a larger cost, which is not so; the cutoff keeps the CLI and the widget printing the same digits. Comment only.
… languages Only a 1e305 row covered the cutoff, so moving it by one step passed. Rows for just under it and for exactly it. Tested: a <= mutant fails the Python and the widget suite.
…the browser Only a TypeError that mentions "fetch" was taken for a network failure, so Safari's "Load failed" and "The network connection was lost." and Chrome's "network error" (a body read cut short) reached the banner as the browsers worded them. A TypeError that matches the known wordings now reads "Network error. Please check your connection."; other TypeErrors and errors of other kinds keep their text. Also states in the timeout helper's comment only what is known: the widget aborts a request only by its own timeout. Tested: new block in frontend/test-widget-paced-streaming.js (295 checks pass); the old fetch-only check and a check that ignores the error's kind each fail it.
The earlier-warning sentence was wrong (an outage was always a warning before this release); what the widget shows for its own timeout is the banner, plus "Connection timeout" only on a reply that had text; the CLI's own 120 s timeout may win; a cost at or above one billion is dropped; the OpenRouter boundary of the retry; the null CLI message, the network wording and the cancel guard; the NWB origins are exact in the community's cors_origins while the worker admits the suffix. Docs only.
…e, tidy test text The Anthropic SDK depends on the published httpx2 package (anthropic 1.6.0 requires httpx2>=2.0), which the comments called a vendored copy or a fork. A 503 or 500 answer before the response is an error answer, not a refusal (a refusal is a 4xx the request caused). The OpenRouter 5xx test said the client's own retries cover it, which its own request count contradicts; the redundant 30 s wait_for in one test goes, since every streamed turn has a deadline. Comments, test names and ids only. Tested: the four touched test files, 246 pass.
The "Retrying ..." warning put the raw error in the log line, so an error whose __str__ raises dropped it (and, under a handler that raises, ended the stream instead of retrying). It now uses exception_text, as the failure line does. Also drops a check in the outage test that the kinds it names already imply. Tested: new test in the next commit.
- botocore's retry of a refused request is asserted to exist, not only to equal itself - a connection that could not be made is an outage (ERROR) - a second failure of another kind after a retry is an ERROR with its traceback - the retry line and the ValueError branches survive an error that cannot print - the CLI's null message fallback for all four stream paths - a failure the classifier can name but not place keeps its kind and is not retried - the widget's network wording is anchored - the close stand-in's docstring says what it is for Tested: each new test fails against a mutant of the code it guards; 455 pass in the touched Python files and 296 widget checks pass.
…7-review-2 Release 0.8.17 review, rounds 2 and 3: outages at ERROR in every phase, widget timeout and network text, test gaps
neuromechanist
temporarily deployed
to
testpypi
October 7, 2026 04:05 — with
GitHub Actions
Inactive
This was referenced Oct 13, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotes
developtomain: a GPT-6 Luna stream that Bedrock cuts short is tried once more, a failed model is called unavailable, each reply shows what it used and cost, and NEMAR and NWB get small updates.What reaches production
The logs show Bedrock closing the stream almost at once with no
messageStopevent, not throttling; CloudWatch shows no errors, client errors or throttles for the Luna profile in that period, and eight near-instant invocations at 01:25 to 01:40 UTC.A stream that fails within ten seconds, after the response began, in a way that can clear by itself (the service ending the stream early, a dropped connection, a service error inside the stream), before the reader has been shown any text, reasoning, tool call or tool result and before any model call has finished, is run once more after about a second.
A failure before the response began is not retried here, because the provider's client already retried it with backoff; a throttle is not retried (botocore and the Anthropic SDK retry one; OpenRouter's client does not), nor a timeout, a refused request or key, an error of our own, or a non-streamed request.
One request on develop stalled until the 120 s read timeout; the stall came out of botocore as a urllib3 error that the classifier did not know, and is now classified as a timeout (not retried).
A provider outage that reaches the reader (the service unavailable, the connection lost, a read that timed out) is logged at ERROR whether or not a retry was possible, with the traceback when a retry would have covered it; before this release it was a warning.
Only Bedrock and Anthropic failures are recognized as coming after the response began, so a model served through OpenRouter gets no retry here.
A stream the reader closes, or a task that is canceled, is not retried, and is logged with the request's context.
errorevent of a streamed/askor/chatnow says "The current model (its model id) is not available right now. Please choose another model." where it said "An error occurred while processing your request." (/chat) or "An error occurred while generating the response. Please try again." (/ask).There is no automatic switch to another model, which would change what a community chose and what a request costs.
A caller whose own API key is rate limited is told that instead.
A client that matches either old string needs updating, and
retryableis stilltruebeside the new text when the failure is known to clear.usageobject (input, output and cache tokens, an estimated cost in US dollars, andpartial) on thedoneevent, on thetool_requestevent that ends a browser run, and onAskResponseandChatResponse.The widget shows one line under each finished reply (
1,240 in (980 cached), 310 out, about $0.0021), summing the runs of a reply that executes code, with "at least" in front when a model run reported no tokens.osa askandosa chatprint the same wording afterUsage:on stderr, so a pipe still carries the answer alone.usageis null when the provider reported no tokens, for requests served through OpenRouter (not covered yet), and when it could not be built.The CLI says "Unknown error" or "Unknown warning" where it printed "Error: None" for a null message, and leaves out a cost of a billion dollars or more.
[Unreleased]is retitled[0.8.17], and feat: allow NWB docs PR previews to use the widget #579 had no entry until now.CHANGELOG.mdhas the full list under## [0.8.17].Compatibility
usage, and the new widget and CLI show nothing against an older server.frontend/osa-chat-widget.js), so its integrity hash changes with them. A page that pins the widget by hash (nemar.org) keeps the old widget, which works, but does not get the usage line until it is re-pinned.ANTHROPIC_CACHE_TTLsays, and the tokens of a call that failed and was tried again are not counted.Retrying ...andThe second try ... succeeded) and not in the request metrics.Outside the repo
Bedrock model invocation logging was turned on for the production account in us-east-2 (CloudWatch Logs group
/osa/bedrock-invocations, 14 days, text delivery on) while investigating #578.It is account-wide and stores full prompts and answers;
delete-model-invocation-logging-configurationturns it off.Issues
Closed by this merge:
Closes #578, closes #582.
Left open on purpose:
Review
Three rounds, as asked, each by four reviewers (code, error handling, tests, comments) on the Sonnet model; every finding was fixed or answered.
No critical or high finding in any round after the first.
Version
src/version.pycarries the.devNsuffix.ensure-stable-version.ymlstrips it onmain; it is not hand-bumped.After merge
ensure-stable-version.ymlsets0.8.17andtag-release.ymltags itv0.8.17GitHub release is published,docker-build.ymlmoveslatest, and production pulls it hourlyhttps://api.osc.earth/osa/healthreports 0.8.17 after the hourly pull, and bothAWS_BEARER_TOKEN_BEDROCKandANTHROPIC_API_KEYare set on the production container, so Luna is reachable for HED, EEGLAB, BIDS and NWBdoneevent carriesusagesync-worker-cors.ymlrun onmaindeployed the worker, and an NWB documentation preview can use the widgetv0.8.17with the SRI hash in the release notes (orscripts/widget-sri.py v0.8.17)xx099905on the dev deployment (NEMAR: a clearer notebook welcome and a curated first plot #577 left that open)sync-develop.ymlopens its PR intodevelop; if it fails, follow the recovery notes at the top of that workflow