Skip to content

MS-1141: Update docs for List Model Catalog search, filters, paginati… - #1214

Open
satyaabhishekippili wants to merge 3 commits into
digitalocean:mainfrom
satyaabhishekippili:MS-1141-update-docs-godo-pydo-mcp-for-badges-and-search-pagination-filtering-in-list-catalog-model
Open

MS-1141: Update docs for List Model Catalog search, filters, paginati…#1214
satyaabhishekippili wants to merge 3 commits into
digitalocean:mainfrom
satyaabhishekippili:MS-1141-update-docs-godo-pydo-mcp-for-badges-and-search-pagination-filtering-in-list-catalog-model

Conversation

@satyaabhishekippili

@satyaabhishekippili satyaabhishekippili commented Aug 11, 2026

Copy link
Copy Markdown

Summary

Document the List Model Catalog API (GET /v2/gen-ai/models/catalog) so the public OpenAPI spec matches the live GenAI API. This unblocks docs.digitalocean.com and downstream pydo regeneration for search, filtering, pagination, sorting, and badges.

Changes

  • Document query parameters: search, model_type, provider, availability, badges, sort_by, per_page, sort_direction, and use_case
  • Keep page; mark limit as deprecated in favor of per_page
  • Document response facet fields: available_model_types, available_providers, available_availability, available_badges, available_sort_by, and available_sort_directions
  • Add apiModelCatalogSortBy and apiModelCatalogUseCase enums to definitions
  • Update the cURL example to show filtered/paginated usage

Test plan

  • make preview and verify List Model Catalog shows the new params and response fields
  • Confirm cURL sample renders correctly
  • After merge, confirm public docs update and pydo regen picks up the new method args

example: '"text-to-text"'
type: string
type: object
apiModelCatalogSortBy:

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.

This enum schema is incomplete - it only has default and description

Please add type: string, the full enum list, and an example, matching apiSortDirection / apiModelEvaluationRunSortField

available_sort_by refs this schema, so without the enum docs won't get the allowed values

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

got it. added type, enum list, example and extended description

default: MODEL_CATALOG_SORT_BY_CREATED_AT
description: |-
Field on which to sort model catalog results.
apiModelCatalogUseCase:

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.

Same issue as apiModelCatalogSortBy

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

added type, enum, example and extended description

items:
type: string
type: array
- default: MODEL_CATALOG_SORT_BY_CREATED_AT

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.

default is on the parameter object, but OpenAPI 3 expects it under schema

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

moved default under schema

name: per_page
schema:
type: integer
- default: SORT_DIRECTION_UNSPECIFIED

@SSharma-10 SSharma-10 Aug 12, 2026

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.

Same fix needed for sort_direction and use_case [line91]. See genai_list_model_evaluation_runs.yml for the pattern.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

moved default under schema

schema:
type: integer
- description: Partial, case-insensitive match on the model's display name.
example: '"example string"'

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.

prefer a real value like llama (and similarly for sort_by / sort_direction / use_case)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

got it. fixed it

curl -X GET \
-H "Content-Type: application/json" \
"https://api.digitalocean.com/v2/gen-ai/models/catalog"
"https://api.digitalocean.com/v2/gen-ai/models/catalog?page=1&per_page=20&search=llama&model_type=chat&sort_by=MODEL_CATALOG_SORT_BY_NAME&sort_direction=SORT_DIRECTION_ASC"

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.

missing Authorization header. Please add it for consistency

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

added Authorization Bearer header

SSharma-10
SSharma-10 previously approved these changes Aug 12, 2026

@SSharma-10 SSharma-10 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.

Thanks. LGTM!

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