Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions specification/DigitalOcean-public.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2756,6 +2756,36 @@ paths:
put:
$ref: 'resources/gen-ai/genai_regenerate_model_api_key.yml'


/v2/gen-ai/models/routers:
get:
$ref: 'resources/gen-ai/genai_list_model_routers.yml'

post:
$ref: 'resources/gen-ai/genai_create_model_router.yml'


/v2/gen-ai/models/routers/presets:
get:
$ref: 'resources/gen-ai/genai_list_model_router_presets.yml'


/v2/gen-ai/models/routers/tasks/presets:
get:
$ref: 'resources/gen-ai/genai_list_model_router_task_presets.yml'


/v2/gen-ai/models/routers/{uuid}:
get:
$ref: 'resources/gen-ai/genai_get_model_router.yml'

put:
$ref: 'resources/gen-ai/genai_update_model_router.yml'

delete:
$ref: 'resources/gen-ai/genai_delete_model_router.yml'


/v2/gen-ai/oauth2/dropbox/tokens:
post:
$ref: 'resources/gen-ai/genai_create_oauth2_dropbox_tokens.yml'
Expand Down
302 changes: 302 additions & 0 deletions specification/resources/gen-ai/definitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1652,6 +1652,46 @@ apiCreateModelProviderKeyOutput:
api_key_info:
$ref: '#/apiModelProviderKeyInfo'
type: object
apiCreateModelRouterInputPublic:
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.

Entries are in alphabetical order, so apiGetModelRouter* must come before apiGetModelUsage*

description: Create a model router
properties:
description:
description: Model router description
example: '"My Model Router Description"'
type: string
fallback_models:
description: Fallback models
example:
- '"openai-gpt-5.4"'
- '"kimi-k2.5"'
items:
example: example string
type: string
type: array
name:
description: Model router name
example: '"My Model Router"'
type: string
policies:
description: Router policies
items:
$ref: '#/apiModelRouterTaskPolicy'
type: array
regions:
description: Target regions for the router
example:
- '"tor1"'
items:
example: example string
type: string
type: array
type: object
apiCreateModelRouterOutput:
description: Information about a newly created model router
properties:
model_router:
$ref: '#/apiModelRouter'
type: object
apiCreateOpenAIAPIKeyInputPublic:
description: CreateOpenAIAPIKeyInputPublic is used to create a new OpenAI API key
for a specific agent.
Expand Down Expand Up @@ -1896,6 +1936,14 @@ apiDeleteModelProviderKeyOutput:
api_key_info:
$ref: '#/apiModelProviderKeyInfo'
type: object
apiDeleteModelRouterOutput:
description: Information about a deleted model router
properties:
uuid:
description: The id of the deleted model router
example: 123e4567-e89b-12d3-a456-426614174000
type: string
type: object
apiDeleteOpenAIAPIKeyInputPublic:
properties:
api_key_uuid:
Expand Down Expand Up @@ -2709,6 +2757,12 @@ apiGetModelProviderKeyOutput:
api_key_info:
$ref: '#/apiModelProviderKeyInfo'
type: object
apiGetModelRouterOutput:
description: The model router
properties:
model_router:
$ref: '#/apiModelRouter'
type: object
apiGetModelUsageInputPublic:
properties:
start:
Expand Down Expand Up @@ -3925,6 +3979,63 @@ apiListModelProviderKeysOutput:
meta:
$ref: '#/apiMeta'
type: object
apiListModelRouterPresetsInputPublic:
properties:
page:
example: "1"
per_page:
example: "20"
apiListModelRouterPresetsOutput:
description: List of model router presets
properties:
links:
$ref: '#/apiLinks'
meta:
$ref: '#/apiMeta'
presets:
description: The model router presets
items:
$ref: '#/apiModelRouterPreset'
type: array
type: object
apiListModelRouterTaskPresetsInputPublic:
properties:
page:
example: "1"
per_page:
example: "20"
apiListModelRouterTaskPresetsOutput:
description: List of model router task presets
properties:
links:
$ref: '#/apiLinks'
meta:
$ref: '#/apiMeta'
tasks:
description: The task presets
items:
$ref: '#/apiModelRouterTaskPreset'
type: array
type: object
apiListModelRoutersInputPublic:
properties:
page:
example: "1"
per_page:
example: "20"
apiListModelRoutersOutput:
description: List of model routers
properties:
links:
$ref: '#/apiLinks'
meta:
$ref: '#/apiMeta'
model_routers:
description: The model routers
items:
$ref: '#/apiModelRouter'
type: array
type: object
apiListModelUsagesByAgentOutput:
description: ListModelUsagesByAgentOutput description
properties:
Expand Down Expand Up @@ -4309,6 +4420,158 @@ apiModelPublic:
version:
$ref: '#/apiModelVersion'
type: object
apiModelRouter:
description: Model router
properties:
config:
$ref: '#/apiModelRouterConfig'
created_at:
description: Creation date / time
example: "2023-01-01T00:00:00Z"
format: date-time
type: string
description:
description: Description
example: example string
type: string
name:
description: Name of the model router
example: example name
type: string
regions:
description: Target regions for the router
example:
- example string
items:
example: example string
type: string
type: array
updated_at:
description: Last modified
example: "2023-01-01T00:00:00Z"
format: date-time
type: string
uuid:
description: Unique id
example: 123e4567-e89b-12d3-a456-426614174000
type: string
type: object
apiModelRouterConfig:
properties:
fallback_models:
description: Router-level fallback models
example:
- example string
items:
example: example string
type: string
type: array
policies:
description: Task routing policies
items:
$ref: '#/apiModelRouterTaskPolicy'
type: array
type: object
apiModelRouterPreset:
description: Model router preset used to prefill new router configurations.
properties:
config:
$ref: '#/apiModelRouterConfig'
display_name:
description: Display name for UI surfaces
example: example name
type: string
long_description:
description: Long description for details views
example: example string
type: string
short_description:
description: Short description for list views
example: example string
type: string
slug:
description: Stable slug for routing usage
example: example string
type: string
type: object
apiModelRouterSelectionPolicy:
description: Selection policy preference for choosing among assigned models.
properties:
prefer:
description: 'One of: none, cheapest, fastest'
example: '"cheapest"'
type: string
type: object
apiModelRouterTaskDetails:
description: Task definition embedded in a model router config.
properties:
description:
description: Short task description
example: '"Summarize long-form text"'
type: string
name:
description: Task name
example: '"Custom Summarization"'
type: string
type: object
apiModelRouterTaskPolicy:
description: Model router policy
properties:
custom_task:
$ref: '#/apiModelRouterTaskDetails'
models:
description: Models assigned to the task
example:
- example string
items:
example: example string
type: string
type: array
selection_policy:
$ref: '#/apiModelRouterSelectionPolicy'
task_slug:
description: Task slug
example: '"summarization"'
type: string
type: object
apiModelRouterTaskPreset:
description: Task preset that can be referenced by slug in model router policies.
properties:
category:
description: Higher-level grouping used by the UI
example: example string
type: string
description:
description: Task description
example: example string
type: string
models:
description: Default models assigned to this task
example:
- example string
items:
example: example string
type: string
type: array
name:
description: Display name
example: example name
type: string
selection_policy:
$ref: '#/apiModelRouterSelectionPolicy'
tags:
description: Lightweight labels for filtering
example:
- example string
items:
example: example string
type: string
type: array
task_slug:
description: Task slug
example: example string
type: string
type: object
apiModelUploadCompleteOutput:
description: Information about an updated model
properties:
Expand Down Expand Up @@ -5393,6 +5656,45 @@ apiUpdateModelProviderKeyOutput:
api_key_info:
$ref: '#/apiModelProviderKeyInfo'
type: object
apiUpdateModelRouterInputPublic:
description: Information about updating a model router
properties:
description:
description: Model router description
example: '"My Model Router Description"'
type: string
fallback_models:
items:
type: object
type: array
name:
description: Model router name
example: '"My Model Router"'
type: string
policies:
description: Router policies
items:
$ref: '#/apiModelRouterTaskPolicy'
type: array
regions:
description: Target regions for the router
example:
- '"tor1"'
items:
example: example string
type: string
type: array
uuid:
description: Model router id
example: '"12345678-1234-1234-1234-123456789012"'
type: string
type: object
apiUpdateModelRouterOutput:
description: Information about an updated model router
properties:
model_router:
$ref: '#/apiModelRouter'
type: object
apiUpdateOpenAIAPIKeyInputPublic:
description: UpdateOpenAIAPIKeyInputPublic is used to update an existing OpenAI
API key for a specific agent.
Expand Down
Loading
Loading