fix(workflows): select v0 API for hosted semantic-segmentation remote execution#2393
Merged
Merged
Conversation
… execution The semantic_segmentation block (v1 and v2) omitted the `client.select_api_v0()` call that every other hosted model block (object/instance/keypoint detection, classification) makes in run_remotely. Without it the InferenceHTTPClient uses the v1 protocol against the hosted endpoint (segment.roboflow.com), whose model-load path resolves the model id as the literal route string "model/add" and queries the registry with modelId=model/add -> 403, surfaced as a spurious API-key error. Affects all hosted semantic-seg models (DeepLabV3+, yolo26-sem) in staging and prod. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dkosowski87
reviewed
Jun 1, 2026
Contributor
dkosowski87
left a comment
There was a problem hiding this comment.
Can we add some tests for resolving the path (hosted/non-hosted)? We will have at least some regression coverage that way.
8226fb2 to
d8fea65
Compare
…w model blocks Per-family test (one file per block type, parametrized over all block versions) asserting run_remotely selects the v0 API + the family's hosted URL when WORKFLOWS_REMOTE_API_TARGET is 'hosted', and uses LOCAL_INFERENCE_API_URL without forcing v0 otherwise. Covers every version of all 6 roboflow model families (object detection v1-v3, instance segmentation v1-v4, semantic segmentation v1-v2, keypoint detection v1-v3, multi-class and multi-label classification v1-v3). Locks the semantic_segmentation fix. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
d8fea65 to
4a82593
Compare
dkosowski87
approved these changes
Jun 1, 2026
Contributor
Author
|
recheck |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
semantic_segmentationworkflow block (v1 and v2) is missing theclient.select_api_v0()call that every other hosted model block makes inrun_remotely. Without it,InferenceHTTPClienttalks to the hosted semantic-seg endpoint (segment.roboflow.com) over the v1 API.Now that the dedicated v1 hosted inference endpoints have been sunset and
segment.roboflow.comis served by the serverless backend (which only supports the v0 / path-parameter API), the v1 path fails: the model load hitsPOST /model/add, the model id never reaches the path-based serverless authorizer, and the request 403s — surfaced as a spurious "API key" error. This breaks all hosted semantic-seg models in workflows (DeepLabV3+ and yolo26-sem), staging and prod. The sibling blocks (object/instance/keypoint detection, classification) already force v0, so they were unaffected by the migration.Fix: force v0 in
run_remotelyfor hosted execution, matching the sibling blocks.Type of change
How has this change been tested?
segment.roboflow.com/model/add403; platform-sideGET /models/v1/external/weights?modelId=model/add403.yolo26n-sem-1024) and confirming a mask is returned.Docs