Feature: DomainBaseModel shared configuration
  As a developer working on the domain layer
  I want all domain models to inherit from DomainBaseModel
  So that the shared model_config is defined in exactly one place

  Scenario: DomainBaseModel is importable from the domain models package
    Given the cleveragents package is available
    When I import DomainBaseModel from the domain models base module
    Then the DomainBaseModel class should be available
    And DomainBaseModel should be a subclass of pydantic BaseModel

  Scenario: DomainBaseModel carries the expected model_config
    Given the cleveragents package is available
    When I inspect the DomainBaseModel model_config
    Then the DomainBaseModel str_strip_whitespace should be True
    And the DomainBaseModel validate_assignment should be True
    And the DomainBaseModel arbitrary_types_allowed should be False
    And the DomainBaseModel populate_by_name should be True
    And the DomainBaseModel use_enum_values should be True

  Scenario: ModelProviderOption inherits from DomainBaseModel
    Given the cleveragents package is available
    When I import ModelProviderOption from aimodelscredentials
    Then ModelProviderOption should be a subclass of DomainBaseModel
    And the ModelProviderOption model_config should match DomainBaseModel

  Scenario: ModelError inherits from DomainBaseModel
    Given the cleveragents package is available
    When I import ModelError from aimodelserrors
    Then ModelError should be a subclass of DomainBaseModel
    And the ModelError model_config should match DomainBaseModel

  Scenario: FallbackResult inherits from DomainBaseModel
    Given the cleveragents package is available
    When I import FallbackResult from aimodelserrors
    Then FallbackResult should be a subclass of DomainBaseModel
    And the FallbackResult model_config should match DomainBaseModel

  Scenario: ModelProviderExtraAuthVars inherits from DomainBaseModel
    Given the cleveragents package is available
    When I import ModelProviderExtraAuthVars from aimodelsproviders
    Then ModelProviderExtraAuthVars should be a subclass of DomainBaseModel
    And the ModelProviderExtraAuthVars model_config should match DomainBaseModel

  Scenario: ModelProviderConfigSchema inherits from DomainBaseModel
    Given the cleveragents package is available
    When I import ModelProviderConfigSchema from aimodelsproviders
    Then ModelProviderConfigSchema should be a subclass of DomainBaseModel
    And the ModelProviderConfigSchema model_config should match DomainBaseModel

  Scenario: AuthHeader inherits from DomainBaseModel
    Given the cleveragents package is available
    When I import AuthHeader from auth
    Then AuthHeader should be a subclass of DomainBaseModel
    And the AuthHeader model_config should match DomainBaseModel

  Scenario: TrialPlansExceededError inherits from DomainBaseModel
    Given the cleveragents package is available
    When I import TrialPlansExceededError from auth
    Then TrialPlansExceededError should be a subclass of DomainBaseModel
    And the TrialPlansExceededError model_config should match DomainBaseModel

  Scenario: TrialMessagesExceededError inherits from DomainBaseModel
    Given the cleveragents package is available
    When I import TrialMessagesExceededError from auth
    Then TrialMessagesExceededError should be a subclass of DomainBaseModel
    And the TrialMessagesExceededError model_config should match DomainBaseModel

  Scenario: BillingError inherits from DomainBaseModel
    Given the cleveragents package is available
    When I import BillingError from auth
    Then BillingError should be a subclass of DomainBaseModel
    And the BillingError model_config should match DomainBaseModel

  Scenario: ApiError inherits from DomainBaseModel
    Given the cleveragents package is available
    When I import ApiError from auth
    Then ApiError should be a subclass of DomainBaseModel
    And the ApiError model_config should match DomainBaseModel

  Scenario: ClientAccount inherits from DomainBaseModel
    Given the cleveragents package is available
    When I import ClientAccount from auth
    Then ClientAccount should be a subclass of DomainBaseModel
    And the ClientAccount model_config should match DomainBaseModel

  Scenario: ClientAuth inherits from DomainBaseModel
    Given the cleveragents package is available
    When I import ClientAuth from auth
    Then ClientAuth should be a subclass of DomainBaseModel
    And the ClientAuth model_config should match DomainBaseModel

  Scenario: PlanConfig inherits from DomainBaseModel
    Given the cleveragents package is available
    When I import PlanConfig from planconfig
    Then PlanConfig should be a subclass of DomainBaseModel
    And the PlanConfig model_config should match DomainBaseModel

  Scenario: ConfigSetting inherits from DomainBaseModel
    Given the cleveragents package is available
    When I import ConfigSetting from planconfig
    Then ConfigSetting should be a subclass of DomainBaseModel
    And the ConfigSetting model_config should match DomainBaseModel

  Scenario: DomainBaseModel config is applied to ModelProviderOption instances
    Given the cleveragents package is available
    When I create a ModelProviderOption with only priority set to 1
    Then the ModelProviderOption should have priority 1
    When I examine the ModelProviderOption model_config
    Then the ModelProviderOption str_strip_whitespace should be True
    And the ModelProviderOption validate_assignment should be True
    And the ModelProviderOption arbitrary_types_allowed should be False
    And the ModelProviderOption populate_by_name should be True
    And the ModelProviderOption use_enum_values should be True

  Scenario: No inline model_config duplication in aimodelscredentials
    Given the cleveragents package is available
    When I inspect the ModelProviderOption class definition
    Then ModelProviderOption should not define its own model_config

  Scenario: No inline model_config duplication in aimodelserrors
    Given the cleveragents package is available
    When I inspect the ModelError class definition
    Then ModelError should not define its own model_config

  Scenario: No inline model_config duplication in aimodelsproviders
    Given the cleveragents package is available
    When I inspect the ModelProviderConfigSchema class definition
    Then ModelProviderConfigSchema should not define its own model_config

  Scenario: No inline model_config duplication in auth
    Given the cleveragents package is available
    When I inspect the AuthHeader class definition
    Then AuthHeader should not define its own model_config

  Scenario: No inline model_config duplication in planconfig
    Given the cleveragents package is available
    When I inspect the PlanConfig class definition
    Then PlanConfig should not define its own model_config
