Skip to content

Dedicated inference functionalities#1825

Merged
anup-deka merged 7 commits intodigitalocean:mainfrom
rarora-it:Dedicated_inference_functionalities
Mar 24, 2026
Merged

Dedicated inference functionalities#1825
anup-deka merged 7 commits intodigitalocean:mainfrom
rarora-it:Dedicated_inference_functionalities

Conversation

@rarora-it
Copy link
Contributor

@rarora-it rarora-it commented Mar 24, 2026

For Update:

TestRunDedicatedInferenceUpdate - Updates an endpoint with a JSON spec file; verifies correct request is sent to the service
TestRunDedicatedInferenceUpdate_WithHuggingFaceToken -Updates with both spec and and hugging face token, flag; verifies secrets are included in the request
TestRunDedicatedInferenceUpdate_MissingID - Returns an error when no dedicated inference ID argument is provided

Update all commands

Update with a JSON spec
doctl dedicated-inference update --spec spec.json
Update with a YAML spec and Hugging Face token
doctl dedicated-inference update --spec spec.yaml --hugging-face-token ""
Update using stdin
cat spec.json | doctl dedicated-inference update --spec -
Show only specific columns
doctl di u --spec spec.yaml --format ID,Name,Status

For list:

TestRunDedicatedInferenceList - Lists all endpoints with no filters (empty region/name)
TestRunDedicatedInferenceList_WithRegion - Lists endpoints filtered by -- region nyc2
TestRunDedicatedInferenceList_WithName - Lists endpoints filtered by --name

List commands

List all endpoints
doctl dedicated-inference list
Filter by region
doctl dedicated-inference list --region nyc2
Filter by name
doctl dedicated-inference list --name my-endpoint
Short alias with format
doctl di ls --format ID,Name,Region,Status

For CreateToken:

TestRunDedicatedInferenceCreateToken - Creates an auth token with -- token name and verifies the correct request and token display
TestRunDedicatedInferenceCreateToken_MissingID - Returns an error when no dedicated inference ID is provided

Create tokens commands

Create a new auth token
doctl dedicated-inference create-token --token-name
Show only ID and Value
doctl dedicated-inference create-token --token-name --format ID,Value

For ListTokens:

TestRunDedicatedInferenceListTokens - Lists auth tokens for a given dedicated inference ID; verifies two tokens are displayed
TestRunDedicatedInferenceListTokens_MissingID - Returns an error when no dedicated inference ID is provided

List token commands

List all tokens for an endpoint
doctl dedicated-inference list-tokens
Show specific columns
doctl dedicated-inference list-tokens --format ID,Name,CreatedAt

For RevokeTokens:

TestRunDedicatedInferenceRevokeToken - Revokes a token with --force verifies both diID and tokenID are passed to the service
TestRunDedicatedInferenceRevokeToken_MissingArgs - Returns an error when no arguments are provided at all
TestRunDedicatedInferenceRevokeToken_MissingTokenID - Returns an error when only the dedicated inference ID is provided (missing token ID)

Revoke token endpoints

Revoke a token (with confirmation prompt)
doctl dedicated-inference revoke-token
Revoke without confirmation
doctl dedicated-inference revoke-token --force

For GetSizes:

TestRunDedicatedInferenceGetSizes - Retrieves GPU sizes; verifies the response includes GPU slug, pricing, regions, CPU, memory, and GPU details

Get sizes all commands

List all available GPU sizes and pricing
doctl dedicated-inference get-sizes
Using alias
doctl di gs
Show only slug, price, and regions
doctl dedicated-inference get-sizes --format GPUSlug,PricePerHour,Regions

for GetGPUModelConfig:

TestRunDedicatedInferenceGetGPUModelConfig - Retrieves GPU model configs; verifies two models returned with slug, name, gated status, and compatible GPU slugs

GPU all commands

List all supported GPU model configurations
doctl dedicated-inference get-gpu-model-config
Using alias
doctl di ggmc
Show only model slug and gated status
doctl dedicated-inference get-gpu-model-config --format ModelSlug,IsModelGated

Also added the integration tests for all.

Copy link
Contributor

@anup-deka anup-deka left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@anup-deka anup-deka merged commit 2eeb172 into digitalocean:main Mar 24, 2026
9 checks passed
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