This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
C# SDK for the Reka AI platform, auto-generated from the Reka OpenAPI specification using AutoSDK. Published as a NuGet package under the tryAGI organization.
# Build the solution
dotnet build Reka.slnx
# Build for release (also produces NuGet package)
dotnet build Reka.slnx -c Release
# Run integration tests (requires REKA_API_KEY env var)
dotnet test src/tests/Reka.IntegrationTests/Reka.IntegrationTests.csproj
# Regenerate SDK from OpenAPI spec
cd src/libs/Reka && ./generate.shThe SDK code is entirely auto-generated — do not manually edit files in src/libs/Reka/Generated/.
src/libs/Reka/openapi.yaml— the Reka OpenAPI spec (manually maintained)src/libs/Reka/generate.sh— runs AutoSDK CLI → output toGenerated/
| Project | Purpose |
|---|---|
src/libs/Reka/ |
Main SDK library (RekaClient) |
src/tests/Reka.IntegrationTests/ |
Integration tests against real Reka API |
Tests in src/tests/Reka.IntegrationTests/Examples are the single source of truth for both test coverage and documentation:
- Each file has a JSDoc header (
order,title,slug) consumed byautosdk docs sync . - Comments prefixed with
////become prose paragraphs in generated docs - CI workflow (
.github/workflows/mkdocs.yml) auto-generatesdocs/examples/and populatesEXAMPLES:START/ENDmarkers in README.md, docs/index.md, and mkdocs.yml - Config:
autosdk.docs.jsonpoints tosrc/tests/Reka.IntegrationTests/Examples
- Target:
net10.0(single target) - Language: C# 13 preview with nullable reference types
- Signing: Strong-named assemblies via
src/key.snk - Versioning: Semantic versioning from git tags (
vprefix) via MinVer - Analysis: All .NET analyzers enabled, AOT/trimming compatibility enforced
- Testing: MSTest + AwesomeAssertions
RekaClient implements Microsoft.Extensions.AI.IChatClient:
GetResponseAsync()— non-streaming chat completionGetStreamingResponseAsync()— true SSE streaming via hand-written HTTP/SSE parsing- Supports text, image/audio/video/PDF content (both
UriContentURLs and inlineDataContentbase64), tool/function calling, structured JSON output viaChatResponseFormat - Maps
ChatOptions.Seedfor reproducible outputs - Hand-written code in
src/libs/Reka/Extensions/RekaClient.ChatClient.cs
Tool calling limitations (Reka API):
- Reka doesn't support
role: "tool"messages — tool results are sent asrole: "user"with formatted text[Tool result for {callId}]: {result} tool_call_idis not sent on user messages (causes Reka 500 errors)- Follow-up requests after tool results should omit
toolsto prevent re-calling - Streaming with tools returns an empty response (Reka API limitation)
- Streaming tool call delta accumulation is implemented but untestable until Reka adds support
RekaClient implements Microsoft.Extensions.AI.ISpeechToTextClient:
GetTextAsync()— audio transcription/translation via base64 data URI conversionGetStreamingTextAsync()— delegates to non-streaming (Reka API doesn't support streaming speech)- Hand-written code in
src/libs/Reka/Extensions/RekaClient.SpeechToTextClient.cs
Note: Reka.IChatClient (generated) and Microsoft.Extensions.AI.IChatClient share the same short name. Use full qualification or type alias (using MeaiChatClient = Microsoft.Extensions.AI.IChatClient;) to avoid ambiguity.
The Research model (reka-flash-research) uses the same /v1/chat/completions endpoint with additional capabilities:
researchparameter — configures web search and parallel thinkingresponse_formatparameter — structured JSON output via JSON Schema- Response includes
reasoning_steps,reasoning_content, andannotations(URL citations)
- Uses shared workflows from
HavenDV/workflowsrepo - Dependabot updates NuGet packages weekly (auto-merged)