Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 17 additions & 0 deletions crates/goose/src/providers/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,23 @@ const SETUP_METADATA: &[CuratedSetupMetadata] = &[
secret_field_default: Some(API_KEY_FIELD),
field_overrides: &[],
},
CuratedSetupMetadata {
provider_id: "xai_oauth",
category: ProviderSetupCategory::Model,
setup_method: ProviderSetupMethod::OauthBrowser,
group: ProviderSetupGroup::Default,
display_name: Some("xAI (SuperGrok)"),
description: Some("Grok via SuperGrok subscription"),
docs_url: Some("https://x.ai/grok"),
aliases: &[],
native_connect_query: Some("xAI Grok"),
binary_name: None,
setup_capabilities: setup_capabilities(false, true, false),
show_only_when_installed: false,
synthetic: false,
secret_field_default: None,
field_overrides: &[],
},
CuratedSetupMetadata {
provider_id: "groq",
category: ProviderSetupCategory::Model,
Expand Down
6 changes: 6 additions & 0 deletions crates/goose/src/providers/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ use super::{
snowflake::SnowflakeProvider,
tetrate::TetrateProvider,
xai::XaiProvider,
xai_oauth::XaiOAuthProvider,
};
use crate::config::ExtensionConfig;
use crate::model::ModelConfig;
Expand Down Expand Up @@ -87,6 +88,7 @@ async fn init_registry() -> RwLock<ProviderRegistry> {
registry.register::<SnowflakeProvider>(false);
registry.register::<TetrateProvider>(true);
registry.register::<XaiProvider>(false);
registry.register::<XaiOAuthProvider>(true);
});
// Register cleanup functions for providers with cached state
registry.set_cleanup(
Expand All @@ -109,6 +111,10 @@ async fn init_registry() -> RwLock<ProviderRegistry> {
"chatgpt_codex",
Arc::new(|| Box::pin(ChatGptCodexProvider::cleanup())),
);
registry.set_cleanup(
"xai_oauth",
Arc::new(|| Box::pin(XaiOAuthProvider::cleanup())),
);

if let Err(e) = load_custom_providers_into_registry(&mut registry) {
tracing::warn!("Failed to load custom providers: {}", e);
Expand Down
1 change: 1 addition & 0 deletions crates/goose/src/providers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ pub mod usage_estimator;
pub mod utils;

pub mod xai;
pub mod xai_oauth;

pub use init::{
cleanup_provider, create, create_with_default_model, create_with_named_model,
Expand Down
Loading
Loading