#73

feat(python-sdk): add multi-dimensional classification

Opendoitrouswants to merge intofrom

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, ms
  • DimensionResponse — tier, model, models_used, usage, and results: 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

Activity

2
coderabbitai[bot]1mo ago

WARNING

Review limit reached

Next included review available in 55 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: d65470e2-2a62-48e5-a685-a0f6233b658a

📥 Commits

Reviewing files that changed from the base of the PR and between 5c241afbb44e01f9e60a2d6184b6ce3621c83b36 and d2eb30999c3b6caa434ba6e52e89236ba295d95d.

📒 Files selected for processing (2)
  • sdk/python/classifier_dev/__init__.py
  • sdk/python/test_classifier_dev.py

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 help to get the list of available commands.