Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
d625e58
chore(deps): bump agent-client-protocol from 0.11.1 to 0.12.1 (#9381)
dependabot[bot] May 23, 2026
8689fdf
chore(deps): bump image from 0.24.9 to 0.25.10 (#9383)
dependabot[bot] May 23, 2026
ce004f7
fix(agents): serialize per-session agent creation to stop duplicate M…
fresh3nough May 23, 2026
c4d64d1
Fix desktop chat search session limiting (#9366)
angiejones May 24, 2026
e1cc44f
Build summon instructions per turn (#9329)
DOsinga May 25, 2026
ba16de9
docs: stats update (#9410)
angiejones May 25, 2026
a11843a
Simplify UI customization (#9353)
DOsinga May 26, 2026
6d544e7
chore(deps): bump qs from 6.14.2 to 6.15.2 in /evals/open-model-gym/m…
dependabot[bot] May 26, 2026
bf0da95
Add Turkish desktop locale (#9392)
seneroner77-cmd May 26, 2026
27dc0d5
Improve dependency hygiene (#9360)
jh-block May 26, 2026
dcdc7f6
fix(desktop): stop the main window growing taller on every launch (#9…
officialasishkumar May 26, 2026
b332f50
Russian language support (#9406)
besdar May 26, 2026
b0cd61a
chore(release): bump version to 1.36.0 (minor) (#9417)
github-actions[bot] May 26, 2026
7dc904e
add databricks ai gateway provider (#9274)
baxen May 26, 2026
1749354
Prefer goose aliases for Databricks v2 inventory (#9430)
baxen May 27, 2026
794402d
fix(ci): build linux x86_64 standard inside manylinux_2_28 for glibc …
88plug May 27, 2026
d90b349
feat: add /model slash command to CLI for session model switching (#8…
baxen May 27, 2026
27b41d9
local inference: stricter GGUF requirements, auto detection of tool c…
jh-block May 27, 2026
d017295
fix: tolerate missing responses output (#9449)
angiejones May 27, 2026
4f43ae4
fix(ui): preserve pending env vars in Add Extension form (#9285)
williams145 May 27, 2026
10ac6b1
feat: make tool output size limit configurable via GOOSE_MAX_TOOL_RES…
DOsinga May 27, 2026
1125e8d
fix: make azure api-version query param optional (#9221)
DOsinga May 27, 2026
35d1fc7
fix(desktop): start new chat in current window from recipe param moda…
michaelneale May 27, 2026
a18b92e
fix(desktop): refresh provider list in Switch Models picker (#9408)
officialasishkumar May 27, 2026
4c88f4b
feat(providers): add Alibaba (Qwen via DashScope) declarative provide…
jezweb May 27, 2026
e9b0d92
feat(providers): add Perplexity as a declarative OpenAI-compatible pr…
jliounis May 27, 2026
c9945bc
chore(deps): bump sha2 from 0.10.9 to 0.11.0 (#8963)
dependabot[bot] May 27, 2026
9c403b1
refactor: convert desktop v1 and goose-server extensions to ACP+ (#9448)
alexhancock May 27, 2026
27d68ba
doc: Add Scaleway provider (#9423)
Quentinchampenois May 28, 2026
d10d009
CLI to list skills with token counts (#9326)
jamadeo May 28, 2026
2116f88
feat: add `tui` feature flag to gate the tui command (#9428)
r0x0d May 28, 2026
1cb5cb0
Add Scholar Sidekick MCP extension (#9433)
mlava May 28, 2026
104cc17
Add ACP session system prompt setter (#9478)
baxen May 29, 2026
a3bdb91
fix(acp): forward ACP server context window size to clients (#9455)
matt2e May 29, 2026
25ff547
Expose raw provider supported models over ACP (#9475)
baxen May 29, 2026
13f7be2
feat: replay acp images on session load (#9496)
kalvinnchau May 29, 2026
8af2f76
feat(providers): add xAI SuperGrok OAuth subscription provider (#9420)
michaelneale Jun 1, 2026
5508079
chore: update canonical model registry (#9551)
baxen Jun 1, 2026
5e160e5
Honor blocking Stop hook decisions (#9468)
johnmatthewtennant Jun 1, 2026
f69a178
fix(otel): skip OTLP signals when protocol=grpc to avoid background-t…
joahg Jun 1, 2026
cd8f718
Fix scheduled recipe session params (#9553)
angiejones Jun 1, 2026
586bb15
fix(extension-manager): forward custom headers through OAuth connect …
hydrosquall Jun 2, 2026
942a456
Revert "refactor: convert desktop v1 and goose-server extensions to A…
alexhancock Jun 2, 2026
fdc1994
chore(release): bump version to 1.37.0 (minor) (#9557)
github-actions[bot] Jun 2, 2026
7982086
Pick the last canonical model (#9568)
DOsinga Jun 2, 2026
030dbb0
feat(security): Add directionality to egress logging (#9546)
dorien-koelemeijer Jun 2, 2026
502ee50
chore(release): release version 1.37.0 (#9565)
github-actions[bot] Jun 2, 2026
cd12199
Bench marking (#9465)
DOsinga Jun 2, 2026
003252f
Import sesssions (#9474)
DOsinga Jun 2, 2026
9626b4c
Replace review subprocess timeout with turn limits (#9571)
lucasconti-dev Jun 2, 2026
30034b9
Add Hugging Face OAuth support, add auth tab to settings (#9552)
jh-block Jun 3, 2026
f6caaa0
Fixed intermittent missing extension override on ui and cleanup (#9575)
lifeizhou-ap Jun 3, 2026
08e7480
Use LRU cache for token counting (#9586)
jh-block Jun 3, 2026
83a4abf
fix: quote release PR search phrase in pre-release.sh (#9573)
alexhancock Jun 3, 2026
0e4a367
chore(deps): bump the cargo-minor-and-patch group across 1 directory …
dependabot[bot] Jun 3, 2026
302dafc
chore(deps): bump mockall from 0.13.1 to 0.14.0 (#9511)
dependabot[bot] Jun 3, 2026
1ab48f5
chore(deps): bump pkcs8 from 0.10.2 to 0.11.0 (#9510)
dependabot[bot] Jun 3, 2026
dc3a63a
chore(deps): bump strum from 0.27.2 to 0.28.0 (#9509)
dependabot[bot] Jun 3, 2026
1205a4a
chore(deps): bump clap_mangen from 0.2.33 to 0.3.0 (#9508)
dependabot[bot] Jun 3, 2026
1a52f21
chore(deps): bump tokenizers from 0.21.4 to 0.22.2 (#9503)
dependabot[bot] Jun 3, 2026
34f33fc
chore(deps): bump EmbarkStudios/cargo-deny-action from 2.0.19 to 2.0.…
dependabot[bot] Jun 3, 2026
9646f70
chore(deps): bump ossf/scorecard-action from 2.4.1 to 2.4.3 (#9501)
dependabot[bot] Jun 3, 2026
1cc5aa6
chore(deps): bump pnpm/action-setup from 6.0.5 to 6.0.8 (#9500)
dependabot[bot] Jun 3, 2026
dc59e41
Lifei/acp session setup refactor (#9488)
lifeizhou-ap Jun 4, 2026
6251e56
feat(sdk): minimal uniffi setup for cross language sdk (#9593)
alexhancock Jun 4, 2026
ec519ee
feat: Only send custom notifications when ACP client specifies this c…
lifeizhou-ap Jun 4, 2026
65b72b2
refactor: remove dead component and useNavigationSessions cleanup (#9…
lifeizhou-ap Jun 5, 2026
2f99664
feat: acp methods for config extensions (#9581)
lifeizhou-ap Jun 5, 2026
826f13f
create goose-providers crate with canonical models, conversation and …
jamadeo Jun 5, 2026
4904e3c
Image read tool (#9607)
DOsinga Jun 5, 2026
e5fd568
move formats/openai.rs into goose-providers crate, along with several…
jamadeo Jun 8, 2026
8eb6cd6
fix: compatibility of config extension acp call in TUI (#9683)
lifeizhou-ap Jun 9, 2026
c5dade7
Merge remote-tracking branch 'upstream/main' into chore/sync-upstream…
earayu Jun 9, 2026
6debd69
Fix upstream sync generated API drift
earayu Jun 9, 2026
3bb22b9
Restore upstream extension OpenAPI routes
earayu Jun 9, 2026
9d0a5a5
Refresh desktop i18n messages
earayu Jun 9, 2026
42e2350
Fix settings view test setup
earayu Jun 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/goose-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ path = "src/bin/generate_manpages.rs"
clap_mangen = { version = "0.3", default-features = false }
goose = { path = "../goose", default-features = false }
goose-mcp = { path = "../goose-mcp", default-features = false }
goose-providers = { path = "../goose-providers", default-features = false }
rmcp = { workspace = true }
clap = { workspace = true }
cliclack = { version = "0.5", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/goose-cli/src/commands/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use console::style;
use goose::config::paths::Paths;
use goose::config::Config;
use goose::conversation::message::Message;
use goose::providers::errors::ProviderError;
use goose::session::session_manager::{DB_NAME, SESSIONS_FOLDER};
use goose_providers::errors::ProviderError;
use serde_yaml;
use std::time::Duration;

Expand Down
6 changes: 3 additions & 3 deletions crates/goose-cli/src/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2091,11 +2091,11 @@ fn handle_agent_error(e: &anyhow::Error, is_stream_json_mode: bool) {
});
}

if e.downcast_ref::<goose::providers::errors::ProviderError>()
if e.downcast_ref::<goose_providers::errors::ProviderError>()
.map(|provider_error| {
matches!(
provider_error,
goose::providers::errors::ProviderError::ContextLengthExceeded(_)
goose_providers::errors::ProviderError::ContextLengthExceeded(_)
)
})
.unwrap_or(false)
Expand Down Expand Up @@ -2366,7 +2366,7 @@ mod tests {
assert_eq!(current.model_name, "gpt-5.4");
assert_eq!(
current.thinking_effort(),
Some(goose::model::ThinkingEffort::High)
Some(goose_providers::thinking::ThinkingEffort::High)
);

let switched = build_switched_model_config("openai", "gpt-5.4", &current).unwrap();
Expand Down
10 changes: 8 additions & 2 deletions crates/goose-providers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ workspace = true

[dependencies]
anyhow = { workspace = true }
async-stream = { workspace = true }
base64 = { workspace = true }
chrono = { workspace = true }
futures = { workspace = true }
once_cell = { workspace = true }
regex = { workspace = true }
rmcp = { workspace = true, features = ["server"] }
regex = { workspace = true, features = ["unicode"] }
reqwest = { workspace = true }
rmcp = { workspace = true, features = ["server", "macros"] }
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
Expand All @@ -28,3 +31,6 @@ uuid = { workspace = true, features = ["v4", "std"] }

[dev-dependencies]
test-case = { workspace = true }
tempfile = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
17 changes: 17 additions & 0 deletions crates/goose-providers/src/base.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use std::future::Future;

pub struct Error;

pub struct Model {
pub name: String,
}

pub struct StreamingRequest {
pub model: Model,
}

pub struct StreamingResponse;

pub trait Provider {
fn stream(req: StreamingRequest) -> impl Future<Output = Result<StreamingResponse, Error>>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use thiserror::Error;
use utoipa::ToSchema;

pub mod message;
pub mod token_usage;
mod tool_result_serde;

#[derive(Debug, Clone, Serialize, Deserialize, ToSchema, PartialEq)]
Expand Down
148 changes: 148 additions & 0 deletions crates/goose-providers/src/conversation/token_usage.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
use std::ops::{Add, AddAssign};

use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ProviderUsage {
pub model: String,
pub usage: Usage,
}

impl ProviderUsage {
pub fn new(model: String, usage: Usage) -> Self {
Self { model, usage }
}

/// Combine this ProviderUsage with another, adding their token counts
/// Uses the model from this ProviderUsage
pub fn combine_with(&self, other: &ProviderUsage) -> ProviderUsage {
ProviderUsage {
model: self.model.clone(),
usage: self.usage + other.usage,
}
}
}

#[derive(Debug, Clone, Serialize, Deserialize, Default, Copy)]
pub struct Usage {
pub input_tokens: Option<i32>,
pub output_tokens: Option<i32>,
pub total_tokens: Option<i32>,
pub cache_read_input_tokens: Option<i32>,
pub cache_write_input_tokens: Option<i32>,
}

fn sum_optionals<T>(a: Option<T>, b: Option<T>) -> Option<T>
where
T: Add<Output = T> + Default,
{
match (a, b) {
(Some(x), Some(y)) => Some(x + y),
(Some(x), None) => Some(x + T::default()),
(None, Some(y)) => Some(T::default() + y),
(None, None) => None,
}
}

impl Add for Usage {
type Output = Self;

fn add(self, other: Self) -> Self {
Self::new(
sum_optionals(self.input_tokens, other.input_tokens),
sum_optionals(self.output_tokens, other.output_tokens),
sum_optionals(self.total_tokens, other.total_tokens),
)
.with_cache_tokens(
sum_optionals(self.cache_read_input_tokens, other.cache_read_input_tokens),
sum_optionals(
self.cache_write_input_tokens,
other.cache_write_input_tokens,
),
)
}
}

impl AddAssign for Usage {
fn add_assign(&mut self, rhs: Self) {
*self = *self + rhs;
}
}

impl Usage {
pub fn new(
input_tokens: Option<i32>,
output_tokens: Option<i32>,
total_tokens: Option<i32>,
) -> Self {
let calculated_total = if total_tokens.is_none() {
match (input_tokens, output_tokens) {
(Some(input), Some(output)) => Some(input + output),
(Some(input), None) => Some(input),
(None, Some(output)) => Some(output),
(None, None) => None,
}
} else {
total_tokens
};

Self {
input_tokens,
output_tokens,
total_tokens: calculated_total,
cache_read_input_tokens: None,
cache_write_input_tokens: None,
}
}

pub fn with_cache_tokens(
mut self,
cache_read_input_tokens: Option<i32>,
cache_write_input_tokens: Option<i32>,
) -> Self {
self.cache_read_input_tokens = cache_read_input_tokens;
self.cache_write_input_tokens = cache_write_input_tokens;
self
}
}

#[cfg(test)]
mod tests {
use super::*;
use anyhow::Result;
use serde_json::json;

#[test]
fn test_usage_serialization() -> Result<()> {
let usage = Usage::new(Some(10), Some(20), Some(30));
let serialized = serde_json::to_string(&usage)?;
let deserialized: Usage = serde_json::from_str(&serialized)?;

assert_eq!(usage.input_tokens, deserialized.input_tokens);
assert_eq!(usage.output_tokens, deserialized.output_tokens);
assert_eq!(usage.total_tokens, deserialized.total_tokens);

// Test JSON structure
let json_value: serde_json::Value = serde_json::from_str(&serialized)?;
assert_eq!(json_value["input_tokens"], json!(10));
assert_eq!(json_value["output_tokens"], json!(20));
assert_eq!(json_value["total_tokens"], json!(30));

Ok(())
}

#[test]
fn test_usage_addition_includes_cached_tokens() {
let usage_a =
Usage::new(Some(100), Some(20), Some(120)).with_cache_tokens(Some(10), Some(5));
let usage_b = Usage::new(Some(50), Some(8), Some(58)).with_cache_tokens(Some(4), Some(1));

let combined = usage_a + usage_b;

assert_eq!(combined.input_tokens, Some(150));
assert_eq!(combined.output_tokens, Some(28));
assert_eq!(combined.total_tokens, Some(178));
assert_eq!(combined.cache_read_input_tokens, Some(14));
assert_eq!(combined.cache_write_input_tokens, Some(6));
}
}
1 change: 1 addition & 0 deletions crates/goose-providers/src/formats.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod openai;
Loading
Loading