You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 1, 2026. It is now read-only.
We already have OpenAIProvider at coevolved/src/coevolved/core/providers/openai.py. We want a Claude/Anthropic provider with comparable behavior, especially around:
prompt coercion (PromptPayload.text vs PromptPayload.messages)
tool calling (ToolSpec ↔ provider tool format, and parsing tool calls into ToolCall)
streaming chunk semantics (LLMStreamChunk, including final finish_reason)
Goals
Review OpenAIProvider for correctness/parity with our core.types models (esp. streaming + tool call handling).
Implement ClaudeProvider based on StreamingLLMProvider.
Scope / Tasks
1) Review OpenAIProvider
Confirm message coercion is correct (PromptPayload → OpenAI messages).
Background
Coevolved defines provider interfaces in
coevolved/src/coevolved/core/types.py:LLMProvider.complete(request: LLMRequest) -> LLMResponseStreamingLLMProvider.stream(request: LLMRequest) -> Iterator[LLMStreamChunk]We already have
OpenAIProvideratcoevolved/src/coevolved/core/providers/openai.py. We want a Claude/Anthropic provider with comparable behavior, especially around:PromptPayload.textvsPromptPayload.messages)ToolSpec↔ provider tool format, and parsing tool calls intoToolCall)LLMStreamChunk, including finalfinish_reason)Goals
OpenAIProviderfor correctness/parity with ourcore.typesmodels (esp. streaming + tool call handling).ClaudeProviderbased onStreamingLLMProvider.Scope / Tasks
1) Review
OpenAIProviderPromptPayload→ OpenAI messages).ToolSpec.parametersJSON schema → OpenAI tools format).tool_callsparsed intoToolCall(arguments: dict)LLMStreamChunk.tool_call_deltais emitted meaningfully, and final tool calls can be reconstructed by consumers if needed.2) Add
ClaudeProvidercoevolved/src/coevolved/core/providers/claude.pycomplete(self, request: LLMRequest) -> LLMResponsestream(self, request: LLMRequest) -> Iterator[LLMStreamChunk]PromptPayload→ Claude message format:messagespresent: map roles/contenttextpresent: wrap as a single user messageToolSpecinto Claude tool schema formatToolCall(id/name/arguments dict)textdeltas as they arrivetool_call_deltasimilarly to OpenAIProviderfinish_reasonset (per our protocol docstring)3) Exports
coevolved/src/coevolved/core/providers/__init__.pyto exportClaudeProvidercoevolved/src/coevolved/core/__init__.pyto re-export it atcoevolved.core.ClaudeProvider4) Dependency decision
anthropicSDK (likely).5) Tests
complete()parses intoLLMResponse(text, tool_calls, usage?, finish_reason?)stream()yieldsLLMStreamChunks and terminates with a final chunk w/finish_reasonToolSpec→ request tool format → tool call parsed back intoToolCall(arguments: dict)Acceptance criteria
ClaudeProviderexists and conforms toStreamingLLMProvider.llm_step(...)withLLMRequest(prompt=..., context=LLMConfig(...)).coevolved.core.providers(and optionallycoevolved.core).References (in-repo)
coevolved/src/coevolved/core/types.pycoevolved/src/coevolved/core/providers/openai.py