Commit Graph

4965 Commits

Author SHA1 Message Date
Filip Kujawa 8c8dfa482f feat(server): surface aggregated usage totals to clients
Source TokenState and the ACP usage updates from the on-the-fly aggregation
(session + sub-agent tree) rather than the stored session record, so clients
see the derived per-message totals including delegated sub-agent spend.
2026-07-02 09:06:01 -07:00
Filip Kujawa 518e5e7ec8 feat(agents): capture per-message usage in the reply loop
Resolve each turn's best-estimate cost (provider-reported when present, else
catalog) once in update_session_metrics and record it to the ledger atomically
with the session totals - for normal turns, auto-compaction, and /compact.
Link sub-agent sessions to their parent so their usage rolls into the parent's
grand total. Attach the turn's usage to its assistant message for display.
2026-07-02 09:06:01 -07:00
Filip Kujawa d7a7fcc52e feat(session): per-message usage ledger with on-the-fly aggregation
Add an append-only usage_ledger table (migration v15) and a persisted
sessions.parent_session_id link. The ledger is decoupled from the messages
table so per-call usage survives conversation rewrites (compaction) and
cancelled turns, and each row records the model that produced it so estimated
costs can be recomputed or broken down per model later.

Session totals are derived by summing the ledger across a session and its
sub-agent descendants (recursive CTE over parent_session_id), with a
per-session fallback to the retained accumulated_* record for sessions that
predate the migration.

record_usage_metrics runs in one atomic transaction: it first reconciles the
ledger with any spend recorded outside it (pre-v15 history, or turns run on a
pre-v15 build after switching branches) via a 'carried_forward' adjustment row
- both builds only ever grow accumulated_*, so the componentwise difference is
exactly the spend the ledger missed - then adds the call's delta to the
accumulated columns in SQL (so concurrent writers can't lose updates) and
appends the ledger row. The derived total and the legacy fallback therefore
converge again after any branch round-trip.
2026-07-02 09:06:01 -07:00
Filip Kujawa 7028d15e02 feat(conversation): add per-message MessageUsage carrier
Add MessageUsage (tokens, cost, cost_source, generation timing) on
MessageMetadata, populated and serialized to clients as groundwork for the
per-message UI, and register it plus CostSource in the OpenAPI schema.
2026-07-02 09:06:01 -07:00
Filip Kujawa 71095b16c7 feat(providers): record provider-reported cost on ProviderUsage
Add optional cost + cost_source (ProviderReported/Estimated) to ProviderUsage
and parse `usage.cost` from OpenRouter and Anthropic-compatible gateways across
the streaming and non-streaming OpenAI and Anthropic paths. Request OpenRouter's
inline cost via `usage: {include: true}`. When no provider cost is present the
cost is filled in downstream from the catalog estimate.

Drop the unused ProviderUsage::combine_with rather than extending it with cost
semantics nothing exercises.
2026-07-02 09:06:01 -07:00
Jasper 79cbb2627d Fail closed on unverifiable update provenance (#10168)
Co-authored-by: Jasper <jasper@spiral.xyz>
2026-07-02 15:09:38 +00:00
Chih-Tao Lee de331d78ef fix(acp): include structuredContent from MCP tool response (#10128) 2026-07-02 14:26:11 +00:00
github-actions[bot] 402ff562b3 chore(release): bump version to 1.41.0 (minor) (#10198)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Lifei Zhou <lifei@squareup.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 12:41:48 +00:00
Jasper a3854aee3d Fix canonical model output paths (#10196) 2026-07-02 11:05:16 +00:00
Jasper ba6fb2b56d Refactor local inference provider crates (#10169) 2026-07-02 08:51:53 +00:00
Jasper bf1a986d5e Allow local file ACP origins (#10194) 2026-07-02 08:37:06 +00:00
Abhijay Jain 410a78983e fix(acp): propagate agent cleanup errors on session delete (#10112)
Signed-off-by: Abhijay Jain <Abhijay007j@gmail.com>
2026-07-02 08:06:41 +00:00
石岳峰 dbc1f88ca7 fix(providers): add claude-sonnet-5 to canonical model registry (#10183)
Co-authored-by: syf2211 <syf2211@users.noreply.github.com>
2026-07-02 06:10:35 +00:00
Lifei Zhou 8cb6d4766c fix: Skip downstream github jobs for release branch build (#10186) 2026-07-02 04:38:40 +00:00
Lifei Zhou 185b185fb8 fix: increased mcp-app-guest request body limit (#10180) 2026-07-02 04:30:53 +00:00
Michael Neale 27958c4c29 Remove open-model-gym eval suite (#10174) 2026-07-02 00:31:15 +00:00
Lifei Zhou b83b194dad acp migration (ui) : ui connect to acp directly instead of goosed (#10081) 2026-07-02 00:29:29 +00:00
Lifei Zhou 0d4b6924b9 Revert "Bedrock model discovery and validation" (#10176) 2026-07-01 23:39:04 +00:00
Jasper a162a7f778 Improve ACP auth and origin defaults (#9886) 2026-07-01 22:08:46 +00:00
Gellért Stadler 7026e14585 Bedrock model discovery and validation (#9997) 2026-07-01 21:19:28 +00:00
dependabot[bot] e5a0162513 chore(deps): bump actions-rust-lang/setup-rust-toolchain from 1.16.1 to 1.17.0 (#10052)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-01 21:18:09 +00:00
yyy33 9165e2738f fix: tolerate partial Responses output items (#10108) 2026-07-01 19:56:57 +00:00
Kyle E DeFreitas 44869db2d9 fix(databricks): always use OpenAI-compatible "parameters" for tools (#10101) 2026-07-01 19:56:54 +00:00
Osraka 2d47d1feea fix(providers): unescape shell-escaped image paths (#10098) 2026-07-01 19:56:52 +00:00
dependabot[bot] bb1bd2667f chore(deps-dev): bump js-yaml from 4.1.1 to 4.2.0 in /documentation (#10107)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-01 19:51:26 +00:00
Jack Amadeo fc5353a39c regenerate schema (#10166) 2026-07-01 18:57:45 +00:00
dependabot[bot] 613f66b9f2 chore(deps): bump actions/stale from 10.1.1 to 10.3.0 (#10050)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-01 18:05:45 +00:00
dependabot[bot] d9d3fce9b7 chore(deps): bump actions/attest-build-provenance from 4.1.0 to 4.1.1 (#10049)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-01 18:05:44 +00:00
dependabot[bot] c595a4ab03 chore(deps): bump pnpm/action-setup from 6.0.8 to 6.0.9 (#9892)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Douwe Osinga <douwe@block.xyz>
2026-07-01 18:05:38 +00:00
Adam Dalloul a3b4166d4e Update EmpirioLabs provider display name to EmpirioLabs AI (#10126) 2026-07-01 17:06:38 +00:00
Jack Amadeo b6349b5125 add declarative provider support to goose-providers crate (#9992) 2026-07-01 16:40:49 +00:00
Douwe Osinga 006d585546 fix(desktop): seed mac auto-update config (#10132)
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
2026-07-01 16:26:40 +00:00
Jack Amadeo 363b309861 Update release testing instructions (#10122) 2026-07-01 14:18:06 +00:00
Douwe Osinga f150672e23 test: generic validator for declarative providers (#10010)
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
2026-07-01 03:13:10 +00:00
Lifei Zhou 82c0b0dfd9 UI acp migratoin: Decouple desktop UI types from generated OpenAPI types (Part 2) (#10149) 2026-07-01 02:44:08 +00:00
Douwe Osinga 66ce9a6beb Remove MCP sampling support (#10087)
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
Co-authored-by: Lifei Zhou <lifei@squareup.com>
2026-07-01 01:53:44 +00:00
Douwe Osinga c8971fe5fb Support TLS for ACP serve (#10088)
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
Co-authored-by: Lifei Zhou <lifei@squareup.com>
2026-07-01 00:43:18 +00:00
Lifei Zhou 2f32070975 feat (ui): Migrate dictation local model manager to ACP (#10131) 2026-07-01 00:02:52 +00:00
Douwe Osinga 31bc265a69 Fix MCP app sandbox bridge lifecycle (#10064)
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
2026-06-30 23:02:25 +00:00
Lucas Kim e8891b7bb0 fix(bedrock): send inference config (max_tokens, temperature) on Converse (#9889)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
2026-06-30 22:59:40 +00:00
Sunil Kumar 12c3e234f5 feat(providers): support OpenRouter request parameters (#9276)
Signed-off-by: sunilkumarvalmiki <g.sunilkumarvalmiki@gmail.com>
Signed-off-by: Douwe Osinga <douwe@sidewalklabs.com>
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
2026-06-30 22:48:03 +00:00
Jasper d1cc1439ec Migrate local inference model management to ACP (#10124) 2026-06-30 22:40:04 +00:00
Jack Amadeo 159fb4d53e (attempt to) fix disk space errors in linux release builds (#10024) 2026-06-30 22:29:53 +00:00
Sean Murphy 20966fd057 feat: add --edit session flag to edit conversation before forking (#9799)
Signed-off-by: Sean Murphy <murphysean84@gmail.com>
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
2026-06-30 21:15:52 +00:00
FenjuFu 04da8e8702 feat: add iFlytek Spark and Astron MaaS providers (#9837)
Signed-off-by: FenjuFu <fufenjupku@gmail.com>
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
2026-06-30 21:15:50 +00:00
Harnoor Singh 452ea10123 fix(desktop): dedupe Nostr session deep link imports (#9918)
Signed-off-by: harrykamboj1 <singhharnoor116@gmail.com>
2026-06-30 21:15:48 +00:00
Max Novich d308b13e75 [codex] Add SessionStart hook parity outside CLI (#9970)
Co-authored-by: Max Novich <mnovich@Maxs-MacBook-Pro.local>
2026-06-30 21:15:46 +00:00
Leo Walker 40bfb137ad feat(providers): add Fireworks AI declarative provider (#9990)
Signed-off-by: Leo Walker <leowalker89@gmail.com>
2026-06-30 21:15:43 +00:00
Kyle E DeFreitas c45f757c9d fix(providers): don't retry deterministically-permanent 400s (thinking-block immutability) (#10005)
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
2026-06-30 21:15:41 +00:00
Rodolfo Olivieri d056c72a2c fix(deps): downgrade pkcs8 to v0.10 to match sec1/pkcs1 v0.7 (#10119)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 21:15:38 +00:00