Anthropic structured output parsing in the workfkow
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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