Skip to content

Migrate off deprecated Vast.ai /api/v0/instances#4031

Merged
jvstme merged 1 commit into
masterfrom
vastai_deprecated_method
Jul 14, 2026
Merged

Migrate off deprecated Vast.ai /api/v0/instances#4031
jvstme merged 1 commit into
masterfrom
vastai_deprecated_method

Conversation

@jvstme

@jvstme jvstme commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator
  • For testing the auth token, use /api/v1/instances.
  • For finding an instance by ID, use /api/v0/instances/{id}. On the upside, this allows to issue only one request for a specific instance, as opposed to traversing paginated /api/vX/instances responses. On the downside, if multiple instances are being provisioned at once, each instance will require separate /api/v0/instances/{id} requests, without an option to reuse cache between instances. This can result in hitting rate limits in VastAICompute.update_provisioning_data, which dstack easily recovers from by retrying on the next pipeline tick.

This PR is an alternative to #3938

- For testing the auth token, use
  `/api/v1/instances`.
- For finding an instance by ID, use
  `/api/v0/instances/{id}`. On the upside, this
  allows to issue only one request for a specific
  instance, as opposed to traversing paginated
  `/api/vX/instances` responses. On the downside,
  if multiple instances are being provisioned at
  once, each instance will require separate
  `/api/v0/instances/{id}` requests, without an
  option to reuse cache between instances. This
  can result in hitting rate limits in
  `VastAICompute.update_provisioning_data`, which
  `dstack` easily recovers from by retrying on the
  next pipeline tick.
@jvstme jvstme merged commit 0abca9a into master Jul 14, 2026
24 checks passed
@jvstme jvstme deleted the vastai_deprecated_method branch July 14, 2026 21:45
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.

1 participant