#73
feat(python-sdk): add multi-dimensional classification
Adds Client.classify_dimensions() and the top-level classify_dimensions() convenience function, exposing the POST /v1/classify dimensions API that the MCP classify_dimensions tool already uses.
New types
DimensionResult— one field result: label, confidence, scores, escalated, unscored, model, msDimensionResponse— tier, model, models_used, usage, andresults: List[Dict[str, DimensionResult]]
Usage
from classifier_dev import classify_dimensions
results = classify_dimensions(
["Checkout charges me twice"],
{"team": ["billing", "identity", "platform"],
"kind": {"labels": ["bug", "request"], "instructions": "bug = broken behavior"}}
)
results[0]["team"].label # "billing"
results[0]["kind"].label # "bug"Tests
Mock server extended with a dimensions handler. Tests cover roundtrip with both label-array and {labels, instructions} shorthand, tier on the wire, batch items, and input validation. All existing tests still pass.
🤖 Generated with Claude Code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.