Skip to content

151 rename model type to size uniformly - #153

Open
minump wants to merge 10 commits into
mainfrom
151-modelsize-uniform
Open

minump wants to merge 10 commits into
mainfrom
151-modelsize-uniform

Conversation

@minump

@minump minump commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

refactor: rename model type to size uniformly

there was ModelInfo.type that was essentially looking at the model size / num gpus needed. Since we use modelType to denote embeddings/llm/vlm, changed the ModelInfo.type to ModelInfo.size to better reflect things.
This involves db table "availableModel" schema change

Need to run db:migrate to test this PR.

@minump minump linked an issue Oct 26, 2026 that may be closed by this pull request
@minump minump self-assigned this Oct 26, 2026
@minump minump added this to the 1.3 milestone Oct 26, 2026
@minump
minump requested a review from joshfactorial October 26, 2026 19:02
@minump
minump requested review from max-zilla and a balanced review from Copilot November 3, 2026 22:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Two fixtures still use type instead of size, breaking frontend type-checking, and replacing the Type chip with Size removes the required LLM/embedding indicator.

2 open issues
What changed in this PR

Renames the model size field from type to size across the catalog, backend, and frontend, distinguishing Small/Medium/Large labels from model capabilities such as LLM or embeddings.

Changes:

  • Updates model interfaces, schemas, synchronization, and API mappings to use size.
  • Adds a data-preserving database column rename with migration metadata.
  • Replaces the model-card Type chip with a Size chip and updates backend fixtures and the changelog.
File Description
frontend/​lib/​models/​types.ts Uses shared ModelSize for ModelInfo.size.
frontend/​lib/​db/​schema.ts Renames the catalog column mapping to size.
frontend/​lib/​db/​migrations/​meta/​0005_snapshot.json Records the renamed column in the schema snapshot.
frontend/​lib/​db/​migrations/​meta/​_journal.json Registers the new migration.
frontend/​lib/​db/​migrations/​0005_rename_model_type_to_size.sql Renames the column without discarding data.
frontend/​hooks/​use-models.ts Updates the client model interface.
frontend/​components/​model-card/​model-metadata-chips.tsx Displays size labels with size-based colors.
frontend/​app/​api/​models/​route.ts Updates catalog response mappings and size inference variables.
frontend/​app/​api/​models/​[modelId]/​route.ts Returns size in individual model responses.
frontend/​app/​(dashboard)/​active-models/​page.tsx Updates fallback model metadata.
CHANGELOG.md Documents the rename and chip change.
backend/​tests/​test_model_service_launch.py Updates launch-test catalog fixtures.
backend/​tests/​test_model_eviction.py Updates eviction-test catalog fixtures.
backend/​app/​services/​model_service.py Uses size in catalog synchronization.
backend/​app/​schemas/​available_model.py Renames Pydantic model fields.
backend/​app/​models/​available_model.py Renames the SQLAlchemy column mapping.

Review effort: Balanced

description: string;
status: 'warm' | 'cold';
type: 'Small' | 'Medium' | 'Large';
size: ModelSize;

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The metadata-chip change removes the existing LLM fallback for models without modelType and displays the internal Text_Embedding value instead of the formatted Text Embedding label.

2 open issues
1 resolved since last review

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The release note claims a Size chip that neither card variant displays, so the inaccurate claim needs to be removed.

2 open issues
1 resolved since last review

Review effort: Balanced

Comment thread CHANGELOG.md Resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@joshfactorial joshfactorial left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple recommended changes to the changelog. Otherwise looks really good!

Comment thread CHANGELOG.md Resolved
Comment thread CHANGELOG.md Resolved
@minump
minump requested a review from joshfactorial November 9, 2026 19:40

This branch has not been deployed

No deployments
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.

Have ModelSize (small, medium, large) be uniform across the codebase

3 participants