v0.21.0
What's Changed
- feat: simplify model and model provider configuration by @adi-wan-askui in #173
🚀 Features
-
Simplified Model Provider Configuration:
-
Multi-Cloud Provider Support: Added native support for Anthropic models hosted on AWS Bedrock and Google Vertex AI. Simply install the optional dependencies (
anthropic[bedrock]oranthropic[vertex]) and configure via environment variables.import os from askui import VisionAgent # Using Vertex AI os.environ["ANTHROPIC_VERTEX_PROJECT_ID"] = "test-project" os.environ["CLOUD_ML_REGION"] = "europe-west1" with VisionAgent() as agent: agent.act("do something", model="vertex/claude-sonnet-4@20250514")
-
Provider Registry: Configure model providers through the model registry using keys ending with
"/"instead of having to configure each model separately. For example, register"openai/"as a provider and all models prefixed with"openai/"will route to that provider implementation.with VisionAgent(models={"openai/": YourOpenAiCustomMessagesApi()}) as agent: agent.act("do something", model="openai/gpt-4o") agent.act("do something", model="openai/gpt-5")
-
Default Provider Environment Variable: Added
ASKUI__VA__MODEL_PROVIDERenvironment variable to set a default model provider that automatically prefixes all model names. -
Default Model Environment Variable: Added
ASKUI__VA__MODELenvironment variable for setting the default model. Supports both simple strings and JSON for complex configurations:export ASKUI__VA__MODEL='{"act":"askui/claude-sonnet-4-20250514"}'
-
Pre-configured Providers: Added
"askui/","bedrock/","anthropic/", and"vertex/"providers by default, enabling seamless usage like:agent.act("search", model="askui/claude-sonnet-4-20250514") agent.act("search", model="bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0")
-
-
New Model Support: Added support for
claude-haiku-4-5-20251001andclaude-sonnet-4-5-20250929Anthropic models with updated model cards in documentation.
📜 Documentation
- Enhanced Documentation: Significantly expanded
docs/using-models.mdwith comprehensive guides on model provider configuration, authentication, and custom provider setup.
🚨 BREAKING CHANGES
-
Removed
modelfromMessageSettings: Themodelparameter has been removed fromMessageSettings.- Migration: Use the
modelparameter ofact(),get(),locate()or pass it to a class extendingAgentBaseinstead.# Before (v0.20.x) agent.act("search", settings=ActSettings(messages=MessageSettings(model="claude-haiku-4-5"), model="askui") # After (v0.21.0) agent.act("search", model="askui/claude-haiku-4-5")
- Migration: Use the
-
Upgraded minimum
anthropicdependency to 0.72.0:- Migration: Replace
anthropic.NotGivenwithanthropic.Omitandanthropic.NOT_GIVENwithanthropic.omit.
- Migration: Replace
-
Renamed
model_choiceparameter tomodel: The parameter name has been unified acrossActModel.act(),GetModel.get(), andLocateModel.locate().- Migration: Replace all instances of
model_choice=withmodel=.# Before (v0.20.x) act_model.act("search", model_choice="claude-sonnet-4") # After (v0.21.0) act_model.act("search", model="claude-sonnet-4")
- Migration: Replace all instances of
-
Removed
ASKUI__MESSAGES__*andANTHROPIC__MESSAGES__*environment variables: These configuration variables are no longer supported.- Migration: Use the
settingsandmodelparameters when calling<agent>.act()instead.# Before (v0.20.x) # Set via environment: ASKUI__MESSAGES__MODEL=claude-sonnet-4 # After (v0.21.0) agent.act("search", model="claude-sonnet-4", settings=ActSettings(...)) # Or use: ASKUI__VA__MODEL=claude-sonnet-4
- Migration: Use the
-
Removed
AgentBase.modelproperty: Direct access to the model property has been removed fromAgentBase.- Migration: Pass the
modelparameter to individual methods (act(),get(),locate()) or set it via theVisionAgentconstructor.
- Migration: Pass the
Full Changelog: v0.20.3...v0.21.0