Skip to content

fix(workflows): select v0 API for hosted semantic-segmentation remote execution#2393

Merged
leeclemnet merged 3 commits into
mainfrom
fix/workflows-semantic-seg-hosted-api-v0
Jun 1, 2026
Merged

fix(workflows): select v0 API for hosted semantic-segmentation remote execution#2393
leeclemnet merged 3 commits into
mainfrom
fix/workflows-semantic-seg-hosted-api-v0

Conversation

@leeclemnet
Copy link
Copy Markdown
Contributor

@leeclemnet leeclemnet commented Jun 1, 2026

Summary

The semantic_segmentation workflow block (v1 and v2) is missing the client.select_api_v0() call that every other hosted model block makes in run_remotely. Without it, InferenceHTTPClient talks 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.com is served by the serverless backend (which only supports the v0 / path-parameter API), the v1 path fails: the model load hits POST /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_remotely for hosted execution, matching the sibling blocks.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How has this change been tested?

  • Diagnosed from staging + prod logs: executor → segment.roboflow.com/model/add 403; platform-side GET /models/v1/external/weights?modelId=model/add 403.
  • Change mirrors the existing v0-forcing blocks verbatim; the real path is hosted serverless, verifiable post-deploy by running a semantic-seg workflow (DeepLabV3+ and yolo26n-sem-1024) and confirming a mask is returned.

Docs

  • Docs updated — n/a, internal routing fix.

… 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>
Copy link
Copy Markdown
Contributor

@dkosowski87 dkosowski87 left a comment

Choose a reason for hiding this comment

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

Can we add some tests for resolving the path (hosted/non-hosted)? We will have at least some regression coverage that way.

@leeclemnet leeclemnet force-pushed the fix/workflows-semantic-seg-hosted-api-v0 branch from 8226fb2 to d8fea65 Compare June 1, 2026 16:48
…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>
@leeclemnet leeclemnet force-pushed the fix/workflows-semantic-seg-hosted-api-v0 branch from d8fea65 to 4a82593 Compare June 1, 2026 16:51
@leeclemnet leeclemnet requested a review from dkosowski87 June 1, 2026 17:09
@leeclemnet leeclemnet enabled auto-merge (squash) June 1, 2026 17:14
@leeclemnet
Copy link
Copy Markdown
Contributor Author

recheck

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@leeclemnet leeclemnet merged commit ec42f97 into main Jun 1, 2026
48 checks passed
@leeclemnet leeclemnet deleted the fix/workflows-semantic-seg-hosted-api-v0 branch June 1, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants