akashi_anthropic 0.3.0
akashi_anthropic: ^0.3.0 copied to clipboard
Anthropic (Claude) provider adapter for the Akashi agent framework: wraps anthropic_sdk_dart behind Akashi's LanguageModel contract, normalizing text/thinking/tool_use blocks.
Changelog #
0.3.0 #
- Coordinated 0.3.0 release (tracks
akashi0.3.0). AnthropicProvider.close()releases the shared HTTP client (a no-op when an external client was injected).- Complete
FinishReasonmapping:tool_use→toolCallsandrefusal→contentFilter, instead of collapsing everything butmax_tokenstostop. - Streaming now honors
request.cancel, stopping the upstream drain on cancellation. - Uses the shared
partsToText/encodeToolOutputhelpers fromakashicore.
0.2.0 #
Initial release — Anthropic (Claude) provider adapter over anthropic_sdk_dart.
AnthropicProvider+ClaudeModel(LanguageModel,StructuredOutputCapablewithtoolMode/promptOnly).- Content-block streaming normalization: text →
TextDeltaPart, thinking →ReasoningDeltaPart(carrying the block signature),tool_use→ToolCallStartPart+input_jsonToolCallDeltaPart. - Leading
SystemMessages map to the top-levelsystemfield;ToolChoice→ Anthropictool_choice; a defaultmax_tokensis supplied when unset. - Offline tests against a mock HTTP client; a runnable
example/.
Note: reasoning signatures are surfaced on the way out, but anthropic_sdk_dart
5.x exposes no thinking input block, so prior thinking is not re-sent on
subsequent turns.