v1.2.0
What's Changed
Added
-
Per-Tenant API Configuration - New
Configurableconcern for tenant-specific API keys:configure_api- Block syntax for configuring tenant API settingsapi_key_for(:provider)- Get API key for a specific providerhas_custom_api_keys?- Check if tenant has custom API keyseffective_api_configuration- Get resolved config with fallbacksconfigured_providers- List all configured providers
-
Polymorphic Tenant Support - Flexible tenant associations for any model
Changed
- Tenant Model Refactor - Unified tenant management with organized concerns:
- Renamed
TenantBudgetmodel toTenantas the central entity for all tenant functionality - Added
Budgetableconcern for budget limits and enforcement - Added
Trackableconcern for usage tracking (cost, tokens, executions) - Added
Configurableconcern for per-tenant API configuration - New tracking methods:
usage_by_agent,usage_by_model,usage_by_day,recent_executions,failed_executions - New status methods:
active?,linked?,activate!,deactivate! TenantBudgetis now an alias for backward compatibility (deprecated, will be removed in future major version)- Added tenant table rename to upgrade generator for seamless migration
- Renamed
Deprecated
RubyLLM::Agents::TenantBudget- UseRubyLLM::Agents::Tenantinsteadllm_budgetassociation in LLMTenant concern - Usellm_tenant_recordinsteadllm_configure_budgetmethod - Usellm_configureinstead
Removed
Limitableconcern - Rate limiting, feature flags, and model restrictions removed (may return in a future release)
Full Changelog: v1.1.0...v1.2.0