Skip to content

feat(domain): add ModelSize value object - #229

Open
utkarsha741 wants to merge 1 commit into
OpenAgentHQ:mainfrom
utkarsha741:feature/model-size-value-object
Open

feat(domain): add ModelSize value object#229
utkarsha741 wants to merge 1 commit into
OpenAgentHQ:mainfrom
utkarsha741:feature/model-size-value-object

Conversation

@utkarsha741

Copy link
Copy Markdown

Summary

Consolidates the loose params/size_bytes fields on ModelVariant into a single immutable ModelSize value object with formatting helpers (e.g. '8B', '4.7GB').

Changes

  • Add ModelSize value object (frozen Pydantic model) in domain/model.py
  • Replace ModelVariant.params/size_bytes with a single size: Optional[ModelSize] field
  • Update info CLI command to use ModelSize.__str__ for display
  • Update test_cli_json_output.py fixture to build variants with ModelSize
  • Add tests/unit/test_model_size.py covering formatting and immutability

Testing

  • pytest -q — 618 passed, 4 skipped
  • ruff check, ruff format, mypy --strict, bandit all pass

Closes #98

Consolidates the loose params/size_bytes fields on ModelVariant into a
single immutable ModelSize value object with formatting helpers
(e.g. '8B', '4.7GB'). Updates the info CLI display and JSON-output
tests to match.

Closes OpenAgentHQ#98
@utkarsha741

Copy link
Copy Markdown
Author

Hi @himanshu231204 , just following up on this PR whenever you
have a chance to take a look. Happy to make any changes if needed.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Domain: add ModelSize value object

1 participant