roboflow / roboflow/inference

Anthropic structured output parsing in the workfkow

Open
#1,696 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
2.5k
Forks
319
Avg merge
1d 14h
Merged PRs (30d)
133

Description

Search before asking
  • I have searched the Inference issues and found no similar feature requests.
Question

I’m running a custom Roboflow workflow for bounding-box labeling that integrates Anthropic models for detection and structured output parsing.
However, neither unrecognized object detection nor structured output generation modes pass Pydantic validation during runtime.

When I include either the JSON Parser block or use VLM as Detector, the workflow fails with:

Failed to assemble claude_output.
Could not successfully use any deserializer for declared kinds.
Details:
Kind: string - Error: Detected runtime parameter claude_output declared to hold string value, but invalid type of data found (dict).
Kind: language_model_output - Error: Detected runtime parameter claude_output declared to hold string value, but invalid type of data found (dict).

It looks like the Anthropic block always returning an object.

Could you help me solve this issue? What should I change in my block configurations? Thanks!

Additional

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the custom workflow with the Anthropic block, JSON Parser block, or VLM as Detector, focusing on the claude_output validation error. Check how structured output and unrecognized object detection declare and deserialize the runtime value; done means the workflow passes Pydantic validation without the dict-versus-string failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.