Skip to content

Commit 627b1bd

Browse files
earayudependabot[bot]jamadeofresh3noughangiejones
authored
chore: sync upstream aaif-goose/goose@main (2026-06-06 daily sync) (#43)
* chore(deps): bump agent-client-protocol from 0.11.1 to 0.12.1 (aaif-goose#9381) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jack Amadeo <jackamadeo@squareup.com> * chore(deps): bump image from 0.24.9 to 0.25.10 (aaif-goose#9383) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(agents): serialize per-session agent creation to stop duplicate MCP init (aaif-goose#9357) Signed-off-by: fresh3nough <anonwurcod@proton.me> * Fix desktop chat search session limiting (aaif-goose#9366) Signed-off-by: Angie Jones <jones.angie@gmail.com> * Build summon instructions per turn (aaif-goose#9329) Signed-off-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Douwe Osinga <douwe@squareup.com> * docs: stats update (aaif-goose#9410) * Simplify UI customization (aaif-goose#9353) Signed-off-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Douwe Osinga <douwe@squareup.com> * chore(deps): bump qs from 6.14.2 to 6.15.2 in /evals/open-model-gym/mcp-harness (aaif-goose#9395) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add Turkish desktop locale (aaif-goose#9392) Signed-off-by: dejavu <dejavu@Mac.home> Co-authored-by: dejavu <dejavu@Mac.home> * Improve dependency hygiene (aaif-goose#9360) Signed-off-by: jh-block <jhugo@block.xyz> * fix(desktop): stop the main window growing taller on every launch (aaif-goose#9409) Signed-off-by: Asish Kumar <officialasishkumar@gmail.com> * Russian language support (aaif-goose#9406) Co-authored-by: Jack Amadeo <jackamadeo@squareup.com> * chore(release): bump version to 1.36.0 (minor) (aaif-goose#9417) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * add databricks ai gateway provider (aaif-goose#9274) Signed-off-by: Bradley Axen <baxen@squareup.com> * Prefer goose aliases for Databricks v2 inventory (aaif-goose#9430) Signed-off-by: Bradley Axen <baxen@squareup.com> * fix(ci): build linux x86_64 standard inside manylinux_2_28 for glibc 2.28+ compat (aaif-goose#9415) Signed-off-by: Andrew Mello <andrew@88plug.com> Co-authored-by: Alex Hancock <alex@alexhancock.com> Co-authored-by: jh-block <255854896+jh-block@users.noreply.github.com> * feat: add /model slash command to CLI for session model switching (aaif-goose#8747) Signed-off-by: Bradley Axen <baxen@squareup.com> Signed-off-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Douwe Osinga <douwe@squareup.com> * local inference: stricter GGUF requirements, auto detection of tool calling support, fixed thinking output parsing (aaif-goose#9442) Signed-off-by: jh-block <jhugo@block.xyz> * fix: tolerate missing responses output (aaif-goose#9449) Signed-off-by: Angie Jones <jones.angie@gmail.com> * fix(ui): preserve pending env vars in Add Extension form (aaif-goose#9285) Signed-off-by: UGBOMEH OGOCHUKWU WILLIAMS <williamsugbomeh@gmail.com> Signed-off-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Douwe Osinga <douwe@squareup.com> * feat: make tool output size limit configurable via GOOSE_MAX_TOOL_RESPONSE_SIZE (aaif-goose#9256) Signed-off-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Douwe Osinga <douwe@squareup.com> * fix: make azure api-version query param optional (aaif-goose#9221) Signed-off-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Douwe Osinga <douwe@squareup.com> * fix(desktop): start new chat in current window from recipe param modal (aaif-goose#9422) Signed-off-by: Michael Neale <micn@block.xyz> * fix(desktop): refresh provider list in Switch Models picker (aaif-goose#9408) Signed-off-by: Asish Kumar <officialasishkumar@gmail.com> * feat(providers): add Alibaba (Qwen via DashScope) declarative provider (aaif-goose#9443) Signed-off-by: Jeremy Dawes <jeremy@jezweb.net> * feat(providers): add Perplexity as a declarative OpenAI-compatible provider (aaif-goose#9324) * chore(deps): bump sha2 from 0.10.9 to 0.11.0 (aaif-goose#8963) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jack Amadeo <jackamadeo@squareup.com> * refactor: convert desktop v1 and goose-server extensions to ACP+ (aaif-goose#9448) * doc: Add Scaleway provider (aaif-goose#9423) Co-authored-by: Quentin Champenois <qchampenois@scaleway.com> * CLI to list skills with token counts (aaif-goose#9326) * feat: add `tui` feature flag to gate the tui command (aaif-goose#9428) Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com> * Add Scholar Sidekick MCP extension (aaif-goose#9433) * Add ACP session system prompt setter (aaif-goose#9478) Signed-off-by: Bradley Axen <baxen@squareup.com> * fix(acp): forward ACP server context window size to clients (aaif-goose#9455) Signed-off-by: Matt Toohey <contact@matttoohey.com> * Expose raw provider supported models over ACP (aaif-goose#9475) Signed-off-by: Bradley Axen <baxen@squareup.com> Signed-off-by: Matt Toohey <contact@matttoohey.com> Co-authored-by: Matt Toohey <contact@matttoohey.com> * feat: replay acp images on session load (aaif-goose#9496) Signed-off-by: Kalvin Chau <kalvin@block.xyz> * feat(providers): add xAI SuperGrok OAuth subscription provider (aaif-goose#9420) Signed-off-by: Michael Neale <michael.neale@gmail.com> * chore: update canonical model registry (aaif-goose#9551) Signed-off-by: Bradley Axen <baxen@squareup.com> * Honor blocking Stop hook decisions (aaif-goose#9468) Signed-off-by: John Tennant <jtennant@squareup.com> * fix(otel): skip OTLP signals when protocol=grpc to avoid background-thread panic (aaif-goose#9512) Co-authored-by: Joah's AI agent <noreply@blockxyz.com> Co-authored-by: Amp <amp@ampcode.com> * Fix scheduled recipe session params (aaif-goose#9553) Signed-off-by: Angie Jones <jones.angie@gmail.com> * fix(extension-manager): forward custom headers through OAuth connect path (aaif-goose#9388) Signed-off-by: Cameron Yick <cameron.yick@datadoghq.com> * Revert "refactor: convert desktop v1 and goose-server extensions to ACP+ (aaif-goose#9448)" (aaif-goose#9564) * chore(release): bump version to 1.37.0 (minor) (aaif-goose#9557) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Pick the last canonical model (aaif-goose#9568) Co-authored-by: Douwe Osinga <douwe@squareup.com> * feat(security): Add directionality to egress logging (aaif-goose#9546) * chore(release): release version 1.37.0 (aaif-goose#9565) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Bench marking (aaif-goose#9465) Signed-off-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Import sesssions (aaif-goose#9474) Co-authored-by: Douwe Osinga <douwe@squareup.com> * Replace review subprocess timeout with turn limits (aaif-goose#9571) Co-authored-by: Cursor <cursoragent@cursor.com> * Add Hugging Face OAuth support, add auth tab to settings (aaif-goose#9552) Signed-off-by: jh-block <jhugo@block.xyz> * Fixed intermittent missing extension override on ui and cleanup (aaif-goose#9575) Signed-off-by: Angie Jones <jones.angie@gmail.com> Co-authored-by: Angie Jones <jones.angie@gmail.com> * Use LRU cache for token counting (aaif-goose#9586) Signed-off-by: jh-block <jhugo@block.xyz> * fix: quote release PR search phrase in pre-release.sh (aaif-goose#9573) * chore(deps): bump the cargo-minor-and-patch group across 1 directory with 10 updates (aaif-goose#9587) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump mockall from 0.13.1 to 0.14.0 (aaif-goose#9511) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump pkcs8 from 0.10.2 to 0.11.0 (aaif-goose#9510) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump strum from 0.27.2 to 0.28.0 (aaif-goose#9509) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump clap_mangen from 0.2.33 to 0.3.0 (aaif-goose#9508) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump tokenizers from 0.21.4 to 0.22.2 (aaif-goose#9503) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump EmbarkStudios/cargo-deny-action from 2.0.19 to 2.0.20 (aaif-goose#9498) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump ossf/scorecard-action from 2.4.1 to 2.4.3 (aaif-goose#9501) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump pnpm/action-setup from 6.0.5 to 6.0.8 (aaif-goose#9500) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Lifei/acp session setup refactor (aaif-goose#9488) * feat(sdk): minimal uniffi setup for cross language sdk (aaif-goose#9593) * feat: Only send custom notifications when ACP client specifies this capability in the initialization request (aaif-goose#9596) * refactor: remove dead component and useNavigationSessions cleanup (aaif-goose#9603) * feat: acp methods for config extensions (aaif-goose#9581) * create goose-providers crate with canonical models, conversation and other types (aaif-goose#9588) * Image read tool (aaif-goose#9607) Co-authored-by: Douwe Osinga <douwe@squareup.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: fresh3nough <anonwurcod@proton.me> Signed-off-by: Angie Jones <jones.angie@gmail.com> Signed-off-by: Douwe Osinga <douwe@squareup.com> Signed-off-by: dejavu <dejavu@Mac.home> Signed-off-by: jh-block <jhugo@block.xyz> Signed-off-by: Asish Kumar <officialasishkumar@gmail.com> Signed-off-by: Bradley Axen <baxen@squareup.com> Signed-off-by: Andrew Mello <andrew@88plug.com> Signed-off-by: UGBOMEH OGOCHUKWU WILLIAMS <williamsugbomeh@gmail.com> Signed-off-by: Michael Neale <micn@block.xyz> Signed-off-by: Jeremy Dawes <jeremy@jezweb.net> Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com> Signed-off-by: Matt Toohey <contact@matttoohey.com> Signed-off-by: Kalvin Chau <kalvin@block.xyz> Signed-off-by: Michael Neale <michael.neale@gmail.com> Signed-off-by: John Tennant <jtennant@squareup.com> Signed-off-by: Cameron Yick <cameron.yick@datadoghq.com> Signed-off-by: earayu <earayu@163.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jack Amadeo <jackamadeo@squareup.com> Co-authored-by: fre$h <anonwurcod@proton.me> Co-authored-by: Angie Jones <jones.angie@gmail.com> Co-authored-by: Douwe Osinga <douwe@block.xyz> Co-authored-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: seneroner77-cmd <seneroner77@gmail.com> Co-authored-by: dejavu <dejavu@Mac.home> Co-authored-by: jh-block <jhugo@block.xyz> Co-authored-by: Asish Kumar <87874775+officialasishkumar@users.noreply.github.com> Co-authored-by: Dmitry Beskov <43372966+besdar@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bradley Axen <baxen@squareup.com> Co-authored-by: 88plug <19512127+88plug@users.noreply.github.com> Co-authored-by: Alex Hancock <alex@alexhancock.com> Co-authored-by: jh-block <255854896+jh-block@users.noreply.github.com> Co-authored-by: UGBOMEH OGOCHUKWU WILLIAMS <williamsugbomeh@gmail.com> Co-authored-by: Michael Neale <michael.neale@gmail.com> Co-authored-by: Jeremy Dawes <jeremy@jezweb.net> Co-authored-by: James Liounis <james.liounis@perplexity.ai> Co-authored-by: Alex Hancock <alexhancock@block.xyz> Co-authored-by: Quentin Champenois <26109239+Quentinchampenois@users.noreply.github.com> Co-authored-by: Quentin Champenois <qchampenois@scaleway.com> Co-authored-by: Jack Amadeo <jackamadeo@block.xyz> Co-authored-by: Rodolfo Olivieri <rolivier@redhat.com> Co-authored-by: Mark Lavercombe <mlava@users.noreply.github.com> Co-authored-by: Matt Toohey <contact@matttoohey.com> Co-authored-by: Kalvin C <kalvinnchau@users.noreply.github.com> Co-authored-by: John Matthew Tennant <johnmatthewtennant@gmail.com> Co-authored-by: Joah Gerstenberg <joah@squareup.com> Co-authored-by: Joah's AI agent <noreply@blockxyz.com> Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Cameron Yick <hydrosquall@users.noreply.github.com> Co-authored-by: dorien-koelemeijer <62866702+dorien-koelemeijer@users.noreply.github.com> Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Lucas Conti <154360314+lucasconti-dev@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Lifei Zhou <lifei@squareup.com>
1 parent f06d1fb commit 627b1bd

49 files changed

Lines changed: 2845 additions & 898 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ prepare-release version:
330330
ui/desktop/package.json \
331331
ui/pnpm-lock.yaml \
332332
ui/desktop/openapi.json \
333-
crates/goose/src/providers/canonical/data/canonical_models.json \
334-
crates/goose/src/providers/canonical/data/provider_metadata.json
333+
crates/goose-providers/src/canonical/data/canonical_models.json \
334+
crates/goose-providers/src/canonical/data/provider_metadata.json
335335
@git commit --message "chore(release): release version {{ version }}"
336336

337337
set-openapi-version version:

crates/goose-providers/Cargo.toml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[package]
2+
name = "goose-providers"
3+
version.workspace = true
4+
edition.workspace = true
5+
rust-version.workspace = true
6+
authors.workspace = true
7+
license.workspace = true
8+
repository.workspace = true
9+
description.workspace = true
10+
11+
[lints]
12+
workspace = true
13+
14+
[dependencies]
15+
anyhow = { workspace = true }
16+
base64 = { workspace = true }
17+
chrono = { workspace = true }
18+
once_cell = { workspace = true }
19+
regex = { workspace = true }
20+
rmcp = { workspace = true, features = ["server"] }
21+
serde = { workspace = true }
22+
serde_json = { workspace = true }
23+
thiserror = { workspace = true }
24+
tracing = { workspace = true }
25+
unicode-normalization = { version = "0.1.22", default-features = false, features = ["std"] }
26+
utoipa = { workspace = true, features = ["chrono"] }
27+
uuid = { workspace = true, features = ["v4", "std"] }
28+
29+
[dev-dependencies]
30+
test-case = { workspace = true }

crates/goose/src/providers/canonical/README.md renamed to crates/goose-providers/src/canonical/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ cargo run --bin build_canonical_models --no-check # Build only, skip checker
1313

1414
This script performs two operations by default:
1515
1. **Builds canonical models** - Fetches from OpenRouter API and updates the registry
16-
- Writes to: `src/providers/canonical/data/canonical_models.json`
16+
- Writes to: `crates/goose-providers/src/canonical/data/canonical_models.json`
1717
2. **Checks model mappings** (unless `--no-check` is passed) - Tests provider mappings and tracks changes over time
1818
- Reports unmapped models
1919
- Compares with previous runs (like a lock file)
2020
- Shows changed/added/removed mappings
21-
- Writes to: `src/providers/canonical/data/canonical_mapping_report.json`
21+
- Writes to: `crates/goose-providers/src/canonical/data/canonical_mapping_report.json`
2222

23-
The script is located in this directory: `build_canonical_models.rs`
23+
The script is currently built from `crates/goose/src/bin/build_canonical_models.rs` and writes into this crate's `src/canonical/data` directory.

crates/goose/src/providers/catalog.rs renamed to crates/goose-providers/src/canonical/catalog.rs

Lines changed: 34 additions & 164 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
use once_cell::sync::Lazy;
22
use serde::{Deserialize, Serialize};
3-
use std::collections::HashMap;
3+
use std::collections::{HashMap, HashSet};
44

5-
use super::{
6-
base::{ConfigKey, ProviderMetadata},
7-
canonical::CanonicalModelRegistry,
8-
};
5+
use super::CanonicalModelRegistry;
96

10-
const PROVIDER_METADATA_JSON: &str = include_str!("canonical/data/provider_metadata.json");
7+
const PROVIDER_METADATA_JSON: &str = include_str!("data/provider_metadata.json");
118

129
#[derive(Debug, Clone, Serialize, Deserialize)]
1310
struct ProviderMetadataEntry {
@@ -175,6 +172,24 @@ pub struct ProviderSetupCatalogEntry {
175172
pub show_only_when_installed: bool,
176173
}
177174

175+
#[derive(Debug, Clone)]
176+
pub struct ProviderSetupMetadata {
177+
pub name: String,
178+
pub display_name: String,
179+
pub description: String,
180+
pub model_doc_link: String,
181+
pub config_keys: Vec<ProviderSetupConfigKey>,
182+
}
183+
184+
#[derive(Debug, Clone)]
185+
pub struct ProviderSetupConfigKey {
186+
pub name: String,
187+
pub required: bool,
188+
pub secret: bool,
189+
pub default: Option<String>,
190+
pub primary: bool,
191+
}
192+
178193
#[derive(Debug, Clone, Copy)]
179194
struct CuratedSetupMetadata {
180195
provider_id: &'static str,
@@ -900,7 +915,7 @@ fn field_label(key: &str) -> String {
900915

901916
fn field_override<'a>(
902917
key: &str,
903-
config_key: &ConfigKey,
918+
config_key: &ProviderSetupConfigKey,
904919
curated: &'a CuratedSetupMetadata,
905920
) -> Option<&'a CuratedFieldMetadata> {
906921
if let Some(field) = curated
@@ -918,7 +933,10 @@ fn field_override<'a>(
918933
None
919934
}
920935

921-
fn setup_field(config_key: &ConfigKey, curated: &CuratedSetupMetadata) -> ProviderSetupField {
936+
fn setup_field(
937+
config_key: &ProviderSetupConfigKey,
938+
curated: &CuratedSetupMetadata,
939+
) -> ProviderSetupField {
922940
let field_override = field_override(&config_key.name, config_key, curated);
923941
ProviderSetupField {
924942
key: config_key.name.clone(),
@@ -936,7 +954,7 @@ fn setup_field(config_key: &ConfigKey, curated: &CuratedSetupMetadata) -> Provid
936954

937955
fn setup_entry_from_metadata(
938956
curated: &CuratedSetupMetadata,
939-
metadata: &ProviderMetadata,
957+
metadata: &ProviderSetupMetadata,
940958
) -> ProviderSetupCatalogEntry {
941959
ProviderSetupCatalogEntry {
942960
provider_id: curated.provider_id.to_string(),
@@ -994,13 +1012,10 @@ fn synthetic_goose_setup_entry(curated: &CuratedSetupMetadata) -> ProviderSetupC
9941012
}
9951013
}
9961014

997-
pub async fn get_providers_by_format(format: ProviderFormat) -> Vec<ProviderCatalogEntry> {
998-
let native_provider_ids = super::init::providers()
999-
.await
1000-
.into_iter()
1001-
.map(|(metadata, _)| metadata.name)
1002-
.collect::<std::collections::HashSet<_>>();
1003-
1015+
pub fn get_providers_by_format(
1016+
format: ProviderFormat,
1017+
native_provider_ids: &HashSet<String>,
1018+
) -> Vec<ProviderCatalogEntry> {
10041019
let mut entries: Vec<ProviderCatalogEntry> = PROVIDER_METADATA
10051020
.values()
10061021
.filter_map(|metadata| {
@@ -1038,13 +1053,9 @@ pub async fn get_providers_by_format(format: ProviderFormat) -> Vec<ProviderCata
10381053
entries
10391054
}
10401055

1041-
pub async fn get_setup_catalog_entries() -> Vec<ProviderSetupCatalogEntry> {
1042-
let registry_metadata = super::providers()
1043-
.await
1044-
.into_iter()
1045-
.map(|(metadata, _)| (metadata.name.clone(), metadata))
1046-
.collect::<HashMap<_, _>>();
1047-
1056+
pub fn get_setup_catalog_entries(
1057+
registry_metadata: &HashMap<String, ProviderSetupMetadata>,
1058+
) -> Vec<ProviderSetupCatalogEntry> {
10481059
SETUP_METADATA
10491060
.iter()
10501061
.filter_map(|curated| {
@@ -1122,144 +1133,3 @@ pub fn get_provider_template(provider_id: &str) -> Option<ProviderTemplate> {
11221133
doc_url: metadata.doc.clone().unwrap_or_default(),
11231134
})
11241135
}
1125-
1126-
#[cfg(test)]
1127-
mod tests {
1128-
use super::*;
1129-
use crate::providers::base::ProviderType;
1130-
1131-
#[tokio::test]
1132-
async fn test_zai_provider() {
1133-
let zai = crate::providers::get_from_registry("zai")
1134-
.await
1135-
.expect("z.ai should be registered as a declarative provider");
1136-
assert_eq!(zai.provider_type(), ProviderType::Declarative);
1137-
1138-
let metadata = zai.metadata();
1139-
assert_eq!(metadata.display_name, "Z.AI");
1140-
assert!(
1141-
!metadata.known_models.is_empty(),
1142-
"z.ai should have known models"
1143-
);
1144-
assert!(
1145-
metadata
1146-
.config_keys
1147-
.iter()
1148-
.any(|key| key.name == "ZHIPU_API_KEY"),
1149-
"z.ai should expose its API key config"
1150-
);
1151-
1152-
let setup_entries = get_setup_catalog_entries().await;
1153-
let setup_entry = setup_entries
1154-
.iter()
1155-
.find(|entry| entry.provider_id == "zai")
1156-
.expect("z.ai should be in the setup catalog");
1157-
assert_eq!(setup_entry.setup_method, ProviderSetupMethod::SingleApiKey);
1158-
1159-
let template = get_provider_template("zai");
1160-
assert!(template.is_some(), "z.ai should have a template");
1161-
1162-
let template = template.unwrap();
1163-
println!("Z.AI template: {} models", template.models.len());
1164-
for model in template.models.iter().take(3) {
1165-
println!(
1166-
" - {} ({}K context)",
1167-
model.name,
1168-
model.context_limit / 1000
1169-
);
1170-
}
1171-
assert!(
1172-
!template.models.is_empty(),
1173-
"z.ai template should have models"
1174-
);
1175-
}
1176-
1177-
#[tokio::test]
1178-
async fn setup_catalog_includes_goose_and_curated_fields() {
1179-
let entries = get_setup_catalog_entries().await;
1180-
1181-
let goose = entries
1182-
.iter()
1183-
.find(|entry| entry.provider_id == "goose")
1184-
.expect("setup catalog should include synthetic goose");
1185-
assert_eq!(goose.category, ProviderSetupCategory::Agent);
1186-
assert_eq!(goose.setup_method, ProviderSetupMethod::None);
1187-
assert!(goose.fields.is_empty());
1188-
1189-
let ollama = entries
1190-
.iter()
1191-
.find(|entry| entry.provider_id == "ollama")
1192-
.expect("setup catalog should include ollama");
1193-
assert_eq!(ollama.setup_method, ProviderSetupMethod::ConfigFields);
1194-
assert_eq!(ollama.fields.len(), 1);
1195-
assert_eq!(ollama.fields[0].key, "OLLAMA_HOST");
1196-
assert_eq!(ollama.fields[0].label, "Host");
1197-
assert_eq!(
1198-
ollama.fields[0].default_value.as_deref(),
1199-
Some("http://localhost:11434")
1200-
);
1201-
1202-
let databricks = entries
1203-
.iter()
1204-
.find(|entry| entry.provider_id == "databricks")
1205-
.expect("setup catalog should include databricks");
1206-
assert_eq!(
1207-
databricks.setup_method,
1208-
ProviderSetupMethod::HostWithOauthFallback
1209-
);
1210-
assert_eq!(
1211-
databricks
1212-
.fields
1213-
.iter()
1214-
.map(|field| field.key.as_str())
1215-
.collect::<Vec<_>>(),
1216-
["DATABRICKS_HOST", "DATABRICKS_TOKEN"]
1217-
);
1218-
1219-
let huggingface = entries
1220-
.iter()
1221-
.find(|entry| entry.provider_id == "huggingface")
1222-
.expect("setup catalog should include huggingface");
1223-
assert_eq!(huggingface.setup_method, ProviderSetupMethod::SingleApiKey);
1224-
assert_eq!(
1225-
huggingface
1226-
.fields
1227-
.iter()
1228-
.map(|field| field.key.as_str())
1229-
.collect::<Vec<_>>(),
1230-
["HF_TOKEN"]
1231-
);
1232-
1233-
let atomic_chat = entries
1234-
.iter()
1235-
.find(|entry| entry.provider_id == "atomic_chat")
1236-
.expect("setup catalog should include atomic_chat declarative provider");
1237-
assert_eq!(atomic_chat.setup_method, ProviderSetupMethod::ConfigFields);
1238-
let host_field = atomic_chat
1239-
.fields
1240-
.iter()
1241-
.find(|field| field.key == "ATOMIC_CHAT_HOST")
1242-
.expect("atomic_chat should expose ATOMIC_CHAT_HOST");
1243-
assert_eq!(host_field.label, "Host URL");
1244-
assert_eq!(
1245-
host_field.default_value.as_deref(),
1246-
Some("http://localhost:1337")
1247-
);
1248-
}
1249-
1250-
#[tokio::test]
1251-
async fn setup_catalog_excludes_uncurated_deprecated_providers() {
1252-
let provider_ids = get_setup_catalog_entries()
1253-
.await
1254-
.into_iter()
1255-
.map(|entry| entry.provider_id)
1256-
.collect::<std::collections::HashSet<_>>();
1257-
1258-
assert!(provider_ids.contains("claude-acp"));
1259-
assert!(provider_ids.contains("codex-acp"));
1260-
assert!(provider_ids.contains("atomic_chat"));
1261-
assert!(!provider_ids.contains("claude_code"));
1262-
assert!(!provider_ids.contains("codex"));
1263-
assert!(!provider_ids.contains("gemini_cli"));
1264-
}
1265-
}

crates/goose/src/providers/canonical/data/canonical_mapping_report.json renamed to crates/goose-providers/src/canonical/data/canonical_mapping_report.json

File renamed without changes.

crates/goose/src/providers/canonical/data/canonical_models.json renamed to crates/goose-providers/src/canonical/data/canonical_models.json

File renamed without changes.

crates/goose/src/providers/canonical/data/provider_metadata.json renamed to crates/goose-providers/src/canonical/data/provider_metadata.json

File renamed without changes.

crates/goose/src/providers/canonical/mod.rs renamed to crates/goose-providers/src/canonical/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
pub mod catalog;
12
mod model;
23
mod name_builder;
34
mod registry;
File renamed without changes.

0 commit comments

Comments
 (0)