gen_ai_hub.orchestration_v2.models.base module

A base model class that extends Pydantic’s BaseModel and ABC.

class gen_ai_hub.orchestration_v2.models.base.ABCBaseModel

Bases: BaseModel, ABC

Abstract base model that extends Pydantic’s BaseModel and ABC.

  • extra=”forbid” prevents unexpected fields from being accepted or sent, since the external API is strict about allowed parameters.

  • exclude_none=True ensures optional fields that were not provided are omitted from the payload instead of being serialized as None.

  • by_alias=True guarantees aliases are used during serialization, which is required because some API field names conflict with Pydantic’s built-ins.

This enforces consistent and safe serialization behavior across all derived models.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_dump(**kwargs)

Dumps the model to a dictionary with default settings.