Class: VibeSort::Providers::Anthropic
- Defined in:
- lib/vibe_sort/providers/anthropic.rb
Overview
Adapter for the Anthropic Messages API
Uses structured outputs (output_config.format with a JSON schema) so the model is guaranteed to return the { "sorted_array": [...] } shape.
Note: current Claude models (Opus 4.7+) reject the temperature parameter, so config.temperature is not forwarded to this provider.
Constant Summary collapse
- ENDPOINT =
"https://api.anthropic.com/v1/messages"- DEFAULT_MODEL =
"claude-opus-4-8"- API_VERSION =
"2023-06-01"- MAX_TOKENS =
4096- OUTPUT_SCHEMA =
{ type: "object", properties: { sorted_array: { type: "array", items: { anyOf: [{ type: "number" }, { type: "string" }] } } }, required: ["sorted_array"], additionalProperties: false }.freeze
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Method Summary
Methods inherited from Base
Constructor Details
This class inherits a constructor from VibeSort::Providers::Base