Skip to content

Add Dedicated Inference Create and Get operations#958

Merged
harshmaru7 merged 3 commits intodigitalocean:mainfrom
Rachana888:feature/dedicated-inference-create
Mar 12, 2026
Merged

Add Dedicated Inference Create and Get operations#958
harshmaru7 merged 3 commits intodigitalocean:mainfrom
Rachana888:feature/dedicated-inference-create

Conversation

@Rachana888
Copy link
Copy Markdown
Contributor

@Rachana888 Rachana888 commented Mar 5, 2026

Summary

  • Adds DedicatedInferenceService with Create and Get operations for the V2 Dedicated Inference API
  • Implements request/response structs matching /v2/dedicated-inferences endpoints
  • Includes unit tests

Related

  • API path: POST /v2/dedicated-inferences, GET /v2/dedicated-inferences/{id}

Notes

  • This is the initial implementation covering Create and Get
  • Remaining operations (List, Update, Delete, ListModels) will be added in a follow-up PR after this approach is reviewed

Testing

Command
go test -v -run "TestDedicatedInfer

Results

=== RUN   TestDedicatedInference_Create
--- PASS: TestDedicatedInference_Create (0.00s)
=== RUN   TestDedicatedInference_Get
--- PASS: TestDedicatedInference_Get (0.00s)
=== RUN   TestDedicatedInference_Get_NoToken
--- PASS: TestDedicatedInference_Get_NoToken (0.00s)
PASS
ok  	github.com/digitalocean/godo

Test Coverage

Test Description
TestDedicatedInference_Create Verifies Create API call with proper request/response handling
TestDedicatedInference_Get Verifies Get API call returns DI with token
TestDedicatedInference_Get_NoToken Verifies Get API handles response without token

@Rachana888 Rachana888 force-pushed the feature/dedicated-inference-create branch from 63076c0 to 7143ace Compare March 5, 2026 12:40
type DedicatedInferenceWorkloadConfig struct{}

// DedicatedInferenceAccelRequest represents an accelerator in a request.
type DedicatedInferenceAccelRequest struct {
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.

lets use full names in the requests

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed, I’ve updated them to the full names

}

// Get an existing Dedicated Inference by its UUID.
func (s *DedicatedInferenceServiceOp) Get(ctx context.Context, id string) (*DedicatedInference, *Response, error) {
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.

for future prs lets keep 1 api support per PR. This will make PR review easy

@Rachana888 Rachana888 force-pushed the feature/dedicated-inference-create branch from 66593a4 to 0b0586b Compare March 10, 2026 09:50
@harshmaru7 harshmaru7 merged commit 34665ce into digitalocean:main Mar 12, 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.

3 participants