feat(openclaude): OpenClaude CLI provider (#213) - #905
Open
ozymandiashh wants to merge 1 commit into
Open
Conversation
OpenClaude is a Claude Code fork routing to any LLM; transcripts are Claude-Code-schema JSONL under ~/.openclaude/projects/<slug>/<uuid>.jsonl with replay.json siblings skipped. Only usage-bearing assistant lines become calls; sidechain lines are counted as real spend; costs are always computed (the transcript reports none) through the shared tables. Real local testing: sessions generated with the actual CLI against DeepSeek (deepseek-chat), parsed end to end.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #213, with @iamtoruk's May yes standing as the feature sign-off (offered in the issue thread tonight; kick it back if that reading was too generous).
What OpenClaude turned out to be (this is why the provider is small): the active distribution is
@gitlawb/openclaudeon npm, and it is a Claude Code fork. Transcripts are Claude-Code-schema JSONL at~/.openclaude/projects/<slug>/<uuid>.jsonl, tool names are already codeburn-canonical, usage is Anthropic-shaped. The provider therefore follows the cline-cli reference shape with no tool mapping table.Semantics: only usage-bearing
assistantlines become calls;queue-operation/last-promptbookkeeping and replay.json siblings are skipped;isSidechain: truesubagent lines are counted (real spend); no cost field exists in the transcript, so every call is priced through the shared tables withcostIsEstimated: true; project = basename of the first cwd, slug fallback;CODEBURN_OPENCLAUDE_DIRoverrides the root;probeRoots()reports the projects dir per the NEW_PROVIDER checklist.Real local testing proof (CONTRIBUTING bar): I installed the actual CLI and generated real sessions against DeepSeek (
--provider openai+ base URLhttps://api.deepseek.com/v1, model deepseek-chat), then ran the provider end to end on them:Honest limitation, documented in docs/providers/openclaude.md: streamed responses can split tool_use blocks across assistant events and only usage-bearing events are parsed, so tool breakdowns are a floor. Token and cost accounting are exact.
18 new tests (discovery incl. replay-skip, parsing, dedup across files sharing a session_id, sidechain counting, project resolution, cost estimation), registry updated,
tsc --noEmitclean, 36/36 across the two touched suites.