From 342bb2e32c0fe934f765a7653834503e8016094c Mon Sep 17 00:00:00 2001 From: divyanshgupta Date: Mon, 13 Apr 2026 18:25:03 +0530 Subject: [PATCH 1/2] NFRNC-702: Update request and response schema to support custom model in Dedicated Inference --- commands/dedicated_inference_test.go | 9 +++++++-- integration/dedicated_inference_get_test.go | 2 ++ integration/dedicated_inference_list_test.go | 4 ++++ integration/dedicated_inference_update_test.go | 5 ++++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/commands/dedicated_inference_test.go b/commands/dedicated_inference_test.go index fedaeed52..015d78ace 100644 --- a/commands/dedicated_inference_test.go +++ b/commands/dedicated_inference_test.go @@ -23,8 +23,9 @@ var ( EnablePublicEndpoint: true, ModelDeployments: []*godo.DedicatedInferenceModelRequest{ { - ModelSlug: "mistral/mistral-7b-instruct-v3", - ModelProvider: "hugging_face", + ModelSlug: "mistral/mistral-7b-instruct-v3", + ModelProvider: "hugging_face", + ProviderModelID: "mistralai/Mistral-7B-Instruct-v0.3", Accelerators: []*godo.DedicatedInferenceAcceleratorRequest{ { Scale: 2, @@ -96,6 +97,7 @@ func TestRunDedicatedInferenceCreate(t *testing.T) { "model_deployments": [ { "model_slug": "mistral/mistral-7b-instruct-v3", + "provider_model_id": "mistralai/Mistral-7B-Instruct-v0.3", "model_provider": "hugging_face", "accelerators": [ {"scale": 2, "type": "prefill", "accelerator_slug": "gpu-mi300x1-192gb"}, @@ -132,6 +134,7 @@ func TestRunDedicatedInferenceCreate_WithHuggingFaceToken(t *testing.T) { "model_deployments": [ { "model_slug": "mistral/mistral-7b-instruct-v3", + "provider_model_id": "mistralai/Mistral-7B-Instruct-v0.3", "model_provider": "hugging_face", "accelerators": [ {"scale": 2, "type": "prefill", "accelerator_slug": "gpu-mi300x1-192gb"}, @@ -202,6 +205,7 @@ func TestRunDedicatedInferenceUpdate(t *testing.T) { "model_deployments": [ { "model_slug": "mistral/mistral-7b-instruct-v3", + "provider_model_id": "mistralai/Mistral-7B-Instruct-v0.3", "model_provider": "hugging_face", "accelerators": [ {"scale": 2, "type": "prefill", "accelerator_slug": "gpu-mi300x1-192gb"}, @@ -239,6 +243,7 @@ func TestRunDedicatedInferenceUpdate_WithHuggingFaceToken(t *testing.T) { "model_deployments": [ { "model_slug": "mistral/mistral-7b-instruct-v3", + "provider_model_id": "mistralai/Mistral-7B-Instruct-v0.3", "model_provider": "hugging_face", "accelerators": [ {"scale": 2, "type": "prefill", "accelerator_slug": "gpu-mi300x1-192gb"}, diff --git a/integration/dedicated_inference_get_test.go b/integration/dedicated_inference_get_test.go index 03fefdacc..c093e6e5d 100644 --- a/integration/dedicated_inference_get_test.go +++ b/integration/dedicated_inference_get_test.go @@ -183,6 +183,7 @@ ID Name Status "model_deployments": [ { "model_id": "model-001", + "provider_model_id": "mistralai/Mistral-7B-Instruct-v0.3", "model_slug": "mistral/mistral-7b-instruct-v3", "model_provider": "hugging_face", "accelerators": [ @@ -218,6 +219,7 @@ ID Name Status "model_deployments": [ { "model_id": "model-001", + "provider_model_id": "mistralai/Mistral-7B-Instruct-v0.3", "model_slug": "mistral/mistral-7b-instruct-v3", "model_provider": "hugging_face", "accelerators": [ diff --git a/integration/dedicated_inference_list_test.go b/integration/dedicated_inference_list_test.go index 6ff20c35e..6bee6184c 100644 --- a/integration/dedicated_inference_list_test.go +++ b/integration/dedicated_inference_list_test.go @@ -176,6 +176,7 @@ ID Name Status "name": "test-di-1", "region": "nyc2", "status": "ACTIVE", + "provider_model_id": ["mistralai/Mistral-7B-Instruct-v0.3"], "vpc_uuid": "00000000-0000-4000-8000-000000000001", "endpoints": { "public_endpoint_fqdn": "public.di-1.example.com", @@ -189,6 +190,7 @@ ID Name Status "name": "test-di-2", "region": "sfo3", "status": "PROVISIONING", + "provider_model_id": ["meta-llama/Meta-Llama-3-8B-Instruct"], "vpc_uuid": "11111111-1111-4111-8111-111111111112", "endpoints": { "public_endpoint_fqdn": "public.di-2.example.com", @@ -212,6 +214,7 @@ ID Name Status "name": "test-di-1", "region": "nyc2", "status": "ACTIVE", + "provider_model_id": ["mistralai/Mistral-7B-Instruct-v0.3"], "vpc_uuid": "00000000-0000-4000-8000-000000000001", "endpoints": { "public_endpoint_fqdn": "public.di-1.example.com", @@ -235,6 +238,7 @@ ID Name Status "name": "test-di-1", "region": "nyc2", "status": "ACTIVE", + "provider_model_id": ["mistralai/Mistral-7B-Instruct-v0.3"], "vpc_uuid": "00000000-0000-4000-8000-000000000001", "endpoints": { "public_endpoint_fqdn": "public.di-1.example.com", diff --git a/integration/dedicated_inference_update_test.go b/integration/dedicated_inference_update_test.go index e6fe91ac9..7db86351f 100644 --- a/integration/dedicated_inference_update_test.go +++ b/integration/dedicated_inference_update_test.go @@ -270,7 +270,8 @@ ID Name Status "enable_public_endpoint": true, "model_deployments": [ { - "model_slug": "mistral/mistral-7b-instruct-v3", + "model_slug": "mistral/mistral-7b-instruct-v3", + "provider_model_id": "mistralai/Mistral-7B-Instruct-v0.3", "model_provider": "hugging_face", "accelerators": [ {"scale": 3, "type": "prefill", "accelerator_slug": "gpu-mi300x1-192gb"}, @@ -288,6 +289,7 @@ vpc: enable_public_endpoint: true model_deployments: - model_slug: mistral/mistral-7b-instruct-v3 + provider_model_id: mistralai/Mistral-7B-Instruct-v0.3 model_provider: hugging_face accelerators: - scale: 3 @@ -322,6 +324,7 @@ model_deployments: "model_deployments": [ { "model_id": "model-001", + "provider_model_id": "mistralai/Mistral-7B-Instruct-v0.3", "model_slug": "mistral/mistral-7b-instruct-v3", "model_provider": "hugging_face", "accelerators": [ From 9b62419343b56806c6dec2a6a3d312755871177b Mon Sep 17 00:00:00 2001 From: divyanshgupta Date: Tue, 14 Apr 2026 20:25:15 +0530 Subject: [PATCH 2/2] NFRNC-702: updated godo version to include changes for dedicated_inference.go --- go.mod | 2 +- go.sum | 4 +- .../digitalocean/godo/dedicated_inference.go | 37 ++++++++++--------- vendor/modules.txt | 2 +- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index fd30fa683..ef34eaa06 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.25.0 require ( github.com/blang/semver v3.5.1+incompatible github.com/creack/pty v1.1.21 - github.com/digitalocean/godo v1.184.0 + github.com/digitalocean/godo v1.184.1-0.20260410132851-6a015e2e3b32 github.com/docker/cli v24.0.5+incompatible github.com/docker/docker v25.0.6+incompatible github.com/docker/docker-credential-helpers v0.7.0 // indirect diff --git a/go.sum b/go.sum index 9fd4701ed..b8cbff8c1 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/digitalocean/godo v1.184.0 h1:2B2CQhxftlf3xa24Nrzn5CBQlaQjyaWqi3XbbnJlG3w= -github.com/digitalocean/godo v1.184.0/go.mod h1:xQsWpVCCbkDrWisHA72hPzPlnC+4W5w/McZY5ij9uvU= +github.com/digitalocean/godo v1.184.1-0.20260410132851-6a015e2e3b32 h1:bO0M6ODWgllf/LlR0wzlxIxiMMcJuHvlrQdDfhC4ufY= +github.com/digitalocean/godo v1.184.1-0.20260410132851-6a015e2e3b32/go.mod h1:xQsWpVCCbkDrWisHA72hPzPlnC+4W5w/McZY5ij9uvU= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/cli v24.0.5+incompatible h1:WeBimjvS0eKdH4Ygx+ihVq1Q++xg36M/rMi4aXAvodc= diff --git a/vendor/github.com/digitalocean/godo/dedicated_inference.go b/vendor/github.com/digitalocean/godo/dedicated_inference.go index 9e08d1962..3628adc79 100644 --- a/vendor/github.com/digitalocean/godo/dedicated_inference.go +++ b/vendor/github.com/digitalocean/godo/dedicated_inference.go @@ -54,11 +54,12 @@ type DedicatedInferenceVPCRequest struct { // DedicatedInferenceModelRequest represents a model deployment in a request. type DedicatedInferenceModelRequest struct { - ModelID string `json:"model_id,omitempty"` - ModelSlug string `json:"model_slug"` - ModelProvider string `json:"model_provider"` - WorkloadConfig *DedicatedInferenceWorkloadConfig `json:"workload_config,omitempty"` - Accelerators []*DedicatedInferenceAcceleratorRequest `json:"accelerators"` + ModelID string `json:"model_id,omitempty"` + ModelSlug string `json:"model_slug"` + ModelProvider string `json:"model_provider"` + ProviderModelID string `json:"provider_model_id"` + WorkloadConfig *DedicatedInferenceWorkloadConfig `json:"workload_config,omitempty"` + Accelerators []*DedicatedInferenceAcceleratorRequest `json:"accelerators"` } // DedicatedInferenceWorkloadConfig represents workload-specific configuration. @@ -104,14 +105,15 @@ type DedicatedInferenceTokenCreateRequest struct { // DedicatedInferenceListItem represents a Dedicated Inference item in a list response. type DedicatedInferenceListItem struct { - ID string `json:"id"` - Name string `json:"name"` - Region string `json:"region"` - Status string `json:"status"` - VPCUUID string `json:"vpc_uuid"` - Endpoints *DedicatedInferenceEndpoints `json:"endpoints,omitempty"` - CreatedAt time.Time `json:"created_at,omitempty"` - UpdatedAt time.Time `json:"updated_at,omitempty"` + ID string `json:"id"` + Name string `json:"name"` + Region string `json:"region"` + Status string `json:"status"` + VPCUUID string `json:"vpc_uuid"` + ProviderModelID []string `json:"provider_model_id,omitempty"` + Endpoints *DedicatedInferenceEndpoints `json:"endpoints,omitempty"` + CreatedAt time.Time `json:"created_at,omitempty"` + UpdatedAt time.Time `json:"updated_at,omitempty"` } // DedicatedInferenceAcceleratorInfo represents an accelerator in a list accelerators response. @@ -167,10 +169,11 @@ type DedicatedInferenceVPCConfig struct { // DedicatedInferenceModelDeployment represents a model deployment in an API response. type DedicatedInferenceModelDeployment struct { - ModelID string `json:"model_id"` - ModelSlug string `json:"model_slug"` - ModelProvider string `json:"model_provider"` - Accelerators []*DedicatedInferenceAccelerator `json:"accelerators"` + ModelID string `json:"model_id"` + ModelSlug string `json:"model_slug"` + ModelProvider string `json:"model_provider"` + ProviderModelID string `json:"provider_model_id,omitempty"` + Accelerators []*DedicatedInferenceAccelerator `json:"accelerators"` } // DedicatedInferenceAccelerator represents an accelerator in an API response. diff --git a/vendor/modules.txt b/vendor/modules.txt index f0b30edf3..86c6d3a5e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -61,7 +61,7 @@ github.com/creack/pty # github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc ## explicit github.com/davecgh/go-spew/spew -# github.com/digitalocean/godo v1.184.0 +# github.com/digitalocean/godo v1.184.1-0.20260410132851-6a015e2e3b32 ## explicit; go 1.23.0 github.com/digitalocean/godo github.com/digitalocean/godo/metrics