From bb06e1e5becf9dd9793273f80d6a552c72799da4 Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 2 Sep 2026 21:27:33 +0000 Subject: [PATCH] Integration request from AIML API (#11758) Co-authored-by: Stan Co-authored-by: Lookoff123 Co-authored-by: Claude Opus 5 --- crates/goose-providers/src/declarative.rs | 1 + .../src/declarative/definitions/aimlapi.json | 57 +++++++++++++++++++ crates/goose/src/providers/init.rs | 16 ++++++ .../docs/getting-started/providers.md | 1 + 4 files changed, 75 insertions(+) create mode 100644 crates/goose-providers/src/declarative/definitions/aimlapi.json diff --git a/crates/goose-providers/src/declarative.rs b/crates/goose-providers/src/declarative.rs index 31fdb9598..ceef92c07 100644 --- a/crates/goose-providers/src/declarative.rs +++ b/crates/goose-providers/src/declarative.rs @@ -13,6 +13,7 @@ pub(crate) mod declarative_providers { use super::*; expose_declarative_providers!( + aimlapi, alibaba, atomic_chat, celeris, diff --git a/crates/goose-providers/src/declarative/definitions/aimlapi.json b/crates/goose-providers/src/declarative/definitions/aimlapi.json new file mode 100644 index 000000000..d84fcbc20 --- /dev/null +++ b/crates/goose-providers/src/declarative/definitions/aimlapi.json @@ -0,0 +1,57 @@ +{ + "name": "aimlapi", + "engine": "openai", + "display_name": "AI/ML API", + "description": "300+ chat models from many creators behind one OpenAI-compatible API key.", + "api_key_env": "AIMLAPI_API_KEY", + "base_url": "https://api.aimlapi.com/v1", + "headers": { + "x-aimlapi-source": "agent/goose", + "x-aimlapi-partner-id": "part_R2KG8QMDBjtWAubVMgG0GF9L", + "http-referer": "https://goose-docs.ai", + "x-title": "goose" + }, + "catalog_provider_id": "aimlapi", + "dynamic_models": true, + "models": [ + { + "name": "openai/gpt-5-5", + "context_limit": 1050000 + }, + { + "name": "anthropic/claude-sonnet-5", + "context_limit": 1000000 + }, + { + "name": "anthropic/claude-opus-5", + "context_limit": 1000000 + }, + { + "name": "google/gemini-3.6-flash", + "context_limit": 1048576 + }, + { + "name": "deepseek/deepseek-v4-pro", + "context_limit": 1000000 + }, + { + "name": "moonshot/kimi-k3", + "context_limit": 1048576 + }, + { + "name": "x-ai/grok-4-5", + "context_limit": 500000 + }, + { + "name": "alibaba/qwen3.8-max", + "context_limit": 1000000 + } + ], + "supports_streaming": true, + "model_doc_link": "https://aimlapi.com/models", + "setup_steps": [ + "Create an account at https://aimlapi.com", + "Open https://aimlapi.com/app/keys and create an API key", + "Copy the key and paste it above" + ] +} diff --git a/crates/goose/src/providers/init.rs b/crates/goose/src/providers/init.rs index 7c9c3e830..543cb49c3 100644 --- a/crates/goose/src/providers/init.rs +++ b/crates/goose/src/providers/init.rs @@ -330,6 +330,22 @@ mod tests { .any(|key| key.name == "HF_TOKEN" && key.secret)); } + #[tokio::test] + async fn test_aimlapi_provider_registry_wiring() { + let aimlapi = get_from_registry("aimlapi") + .await + .expect("aimlapi provider should be registered"); + let meta = aimlapi.metadata(); + + assert_eq!(meta.name, "aimlapi"); + assert_eq!(meta.display_name, "AI/ML API"); + assert_eq!(meta.default_model, "openai/gpt-5-5"); + assert!(meta + .config_keys + .iter() + .any(|key| key.name == "AIMLAPI_API_KEY" && key.secret)); + } + #[tokio::test] async fn test_gondola_provider_registry_wiring() { let gondola = get_from_registry("gondola") diff --git a/documentation/docs/getting-started/providers.md b/documentation/docs/getting-started/providers.md index 47e8d4fe9..957aca844 100644 --- a/documentation/docs/getting-started/providers.md +++ b/documentation/docs/getting-started/providers.md @@ -22,6 +22,7 @@ goose is compatible with a wide range of LLM providers, allowing you to choose a | Provider | Description | Parameters | |-----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [AI/ML API](https://aimlapi.com/) | One API key for 300+ chat, image, video, audio, and embedding models from many providers, OpenAI-compatible. | `AIMLAPI_API_KEY` | | [Amazon Bedrock](https://aws.amazon.com/bedrock/) | Offers a variety of foundation models, including Claude, Jurassic-2, and others. **AWS environment variables must be set in advance, not configured through `goose configure`** | Credential auth: `AWS_PROFILE`, or `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION`

Bearer token auth: `AWS_BEARER_TOKEN_BEDROCK` and `AWS_REGION`, `AWS_DEFAULT_REGION`, or `AWS_PROFILE` | | [Amazon SageMaker TGI](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints.html) | Run Text Generation Inference models through Amazon SageMaker endpoints. **AWS credentials must be configured in advance.** | `SAGEMAKER_ENDPOINT_NAME`, `AWS_REGION` (optional), `AWS_PROFILE` (optional) | | [Anthropic](https://www.anthropic.com/) | Offers Claude, an advanced AI model for natural language tasks. | `ANTHROPIC_API_KEY`, `ANTHROPIC_HOST` (optional) |