-
Notifications
You must be signed in to change notification settings - Fork 151
MS-1141: Update docs for List Model Catalog search, filters, paginati… #1214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5545,12 +5545,66 @@ apiListModelAPIKeysOutput: | |
| type: object | ||
| apiListModelCatalogInput: | ||
| properties: | ||
| limit: | ||
| example: "100" | ||
| availability: | ||
| example: '["serverless", "dedicated"]' | ||
| badges: | ||
| example: '["featured"]' | ||
| model_type: | ||
| example: '["chat", "embedding"]' | ||
| page: | ||
| example: "1" | ||
| per_page: | ||
| example: "10" | ||
| provider: | ||
| example: '["Meta", "Google", "DeepSeek"]' | ||
| search: | ||
| example: llama | ||
| apiListModelCatalogOutput: | ||
| properties: | ||
| available_availability: | ||
| description: All deployment availability values the client can offer in the | ||
| availability filter UI. | ||
| example: | ||
| - example string | ||
| items: | ||
| example: example string | ||
| type: string | ||
| type: array | ||
| available_badges: | ||
| description: All badge values the client can offer in the badges filter UI. | ||
| example: | ||
| - example string | ||
| items: | ||
| example: example string | ||
| type: string | ||
| type: array | ||
| available_model_types: | ||
| description: All model type values the client can offer in the type filter UI. | ||
| example: | ||
| - example string | ||
| items: | ||
| example: example string | ||
| type: string | ||
| type: array | ||
| available_providers: | ||
| description: All provider values the client can offer in the provider filter | ||
| UI. | ||
| example: | ||
| - example string | ||
| items: | ||
| example: example string | ||
| type: string | ||
| type: array | ||
| available_sort_by: | ||
| description: All sort-by field values the client can offer in the sort UI. | ||
| items: | ||
| $ref: '#/apiModelCatalogSortBy' | ||
| type: array | ||
| available_sort_directions: | ||
| description: All sort-direction values the client can offer in the sort UI. | ||
| items: | ||
| $ref: '#/apiSortDirection' | ||
| type: array | ||
| data: | ||
| items: | ||
| $ref: '#/apiModelCatalogEntry' | ||
|
|
@@ -6255,6 +6309,51 @@ apiModelCatalogEntry: | |
| example: '"text-to-text"' | ||
| type: string | ||
| type: object | ||
| apiModelCatalogSortBy: | ||
| default: MODEL_CATALOG_SORT_BY_CREATED_AT | ||
| description: |- | ||
| Field on which to sort model catalog results. | ||
|
|
||
| - MODEL_CATALOG_SORT_BY_CREATED_AT: Default: sort by creation date. | ||
| - MODEL_CATALOG_SORT_BY_NAME: Sort by the model's display name (case-insensitive). | ||
| - MODEL_CATALOG_SORT_BY_PRICE: Sort by input token price. | ||
| enum: | ||
| - MODEL_CATALOG_SORT_BY_CREATED_AT | ||
| - MODEL_CATALOG_SORT_BY_NAME | ||
| - MODEL_CATALOG_SORT_BY_PRICE | ||
| example: MODEL_CATALOG_SORT_BY_CREATED_AT | ||
| type: string | ||
| apiModelCatalogUseCase: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same issue as
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added type, enum, example and extended description |
||
| default: MODEL_CATALOG_USE_CASE_UNSPECIFIED | ||
| description: |- | ||
| Pre-defined use-case filter for the model catalog. When set, only models | ||
| that match the selected use case are returned. The server maps each value | ||
| to a combination of `model_type`, `usecases`, and `output_modalities` checks | ||
| so the client does not need to construct those filters manually. | ||
|
|
||
| - MODEL_CATALOG_USE_CASE_UNSPECIFIED: No use-case filter applied; return all models. | ||
| - MODEL_CATALOG_USE_CASE_CODING: Coding-optimized models: model_type = coding, or usecases include coding, | ||
| agentic_coding, or code_generation. | ||
| - MODEL_CATALOG_USE_CASE_AGENTS: Agent-building models: usecases include tool_calling, agentic, | ||
| agent_platform, agentic_workflows, or agentic_coding. | ||
| - MODEL_CATALOG_USE_CASE_AUDIO: Audio models: model_type is audio, or usecases include audio, | ||
| text_to_speech, or voice_cloning, or output modalities include audio. | ||
| - MODEL_CATALOG_USE_CASE_IMAGE: Image models: model_type is image, or usecases include image_generation, | ||
| text_to_image, or ideogram, or output modalities include image. | ||
| - MODEL_CATALOG_USE_CASE_VIDEO: Video models: usecases include video_generation or text_to_video, or | ||
| output modalities include video. | ||
| - MODEL_CATALOG_USE_CASE_EMBEDDING: Embedding and reranking models: model_type is embedding or reranking, or | ||
| usecases include vectorization or reranking. | ||
| enum: | ||
| - MODEL_CATALOG_USE_CASE_UNSPECIFIED | ||
| - MODEL_CATALOG_USE_CASE_CODING | ||
| - MODEL_CATALOG_USE_CASE_AGENTS | ||
| - MODEL_CATALOG_USE_CASE_AUDIO | ||
| - MODEL_CATALOG_USE_CASE_IMAGE | ||
| - MODEL_CATALOG_USE_CASE_VIDEO | ||
| - MODEL_CATALOG_USE_CASE_EMBEDDING | ||
| example: MODEL_CATALOG_USE_CASE_UNSPECIFIED | ||
| type: string | ||
| apiModelEndpoint: | ||
| description: An available endpoint for a model and its capabilities | ||
| properties: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,5 @@ lang: cURL | |
| source: |- | ||
| curl -X GET \ | ||
| -H "Content-Type: application/json" \ | ||
| "https://api.digitalocean.com/v2/gen-ai/models/catalog" | ||
| -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ | ||
| "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" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing Authorization header. Please add it for consistency
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added Authorization Bearer header |
||
There was a problem hiding this comment.
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
defaultanddescriptionPlease add
type: string, the fullenumlist, and anexample, matchingapiSortDirection/apiModelEvaluationRunSortFieldavailable_sort_byrefs this schema, so without the enum docs won't get the allowed valuesThere was a problem hiding this comment.
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