Skip to content

feat: add archived field to /models endpoint API#275

Merged
mrmaloof merged 1 commit into
developfrom
feature/add-archived-field-to-models-endpoint
Jul 22, 2026
Merged

feat: add archived field to /models endpoint API#275
mrmaloof merged 1 commit into
developfrom
feature/add-archived-field-to-models-endpoint

Conversation

@vishpillai123

@vishpillai123 vishpillai123 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add archived to the ModelInfo response model.
  • Populate archived (cast from the existing ModelTable.archived int column) on GET /{inst_id}/models, GET /{inst_id}/models/{model_name}, and POST /{inst_id}/models/, so callers no longer have to rely solely on the PATCH /{inst_id}/models/{model_name}/archive response to know a model's archived state.

Asana

https://app.asana.com/1/6325821815997/project/1208486153653829/task/1216766104607108?focus=true

Test plan

  • uv run pytest src/webapp/routers/models_test.py -q (18 passed)
  • uv run ruff check / uv run mypy on changed files
  • Added assertions confirming archived is reflected on the list/detail endpoints after archiving a model in test_archive_model

Made with Cursor


Expose the existing model.archived column on ModelInfo so that
GET /{inst_id}/models, GET /{inst_id}/models/{model_name}, and
POST /{inst_id}/models/ all report whether a model is archived,
instead of only the PATCH .../archive endpoint knowing about it.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vishpillai123
vishpillai123 requested review from mrmaloof and nm3224 July 21, 2026 19:21
@mrmaloof
mrmaloof merged commit 1ba80c5 into develop Jul 22, 2026
23 of 25 checks passed
@mrmaloof
mrmaloof deleted the feature/add-archived-field-to-models-endpoint branch July 22, 2026 11:09
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.

2 participants