gut(cron): replace vestigial model/provider telemetry with runtime field#2121
Merged
alexey-pelykh merged 1 commit intomainfrom Apr 8, 2026
Merged
gut(cron): replace vestigial model/provider telemetry with runtime field#2121alexey-pelykh merged 1 commit intomainfrom
alexey-pelykh merged 1 commit intomainfrom
Conversation
…eld (#2110) Replace `model` and `provider` fields in `CronRunTelemetry` with a single `runtime` field that captures the resolved agent runtime (claude/gemini/ codex/opencode) from `resolveAgentRuntimeOrThrow()`. The old fields always resolved to "unknown" because RemoteClaw's CLI runtimes own model selection — the middleware has no visibility into which model the CLI chose. The resolved runtime IS available and is now captured in telemetry. Changes span the full telemetry pipeline: - Type layer: CronRunTelemetry, CronRunLogEntrySchema, UI CronRunLogEntry - Producer: run.ts captures resolvedRuntime, removes fallbackModel/Provider - Propagation: timer.ts emitJobFinished, ops.ts, server-cron.ts - Consumer: run-log.ts parser, cron UI view, usage report script Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 tasks
alexey-pelykh
added a commit
that referenced
this pull request
Apr 8, 2026
The upstream #2121 re-enabled these tests which now need the resolveAgentRuntime mock and updated default assertions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
alexey-pelykh
added a commit
that referenced
this pull request
Apr 8, 2026
…e name (#2124) * fix(session): resolve CLI session key mismatch — use runtime name as provider (#2105) The gutted resolveDefaultModel() stub returned defaultProvider: "unknown", which flowed through to providerUsed. Since isCliProvider("unknown") returned false, CLI session IDs were never persisted — preventing --resume from being passed on subsequent messages in the same thread. Three changes fix the pipeline: 1. resolveDefaultModel() now uses resolveAgentRuntime() to return the actual runtime name (e.g. "claude") as the default provider. 2. isCliProvider() recognizes the four agent runtime names (claude, gemini, codex, opencode) as CLI providers, independent of cliBackends config. 3. The cron isolated-agent path uses the same runtime-based provider resolution instead of hardcoded "unknown". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(test): add resolveAgentRuntime mock to cron-model-override test The upstream #2121 re-enabled these tests which now need the resolveAgentRuntime mock and updated default assertions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
modelandproviderfields inCronRunTelemetrywith a singleruntimefield capturing the resolved agent runtime (claude/gemini/codex/opencode) fromresolveAgentRuntimeOrThrow()fallbackModel/fallbackProvidervariables fromrun.ts— these only fed telemetry and always resolved to"unknown"model/providerfields are silently ignored on parse (backward compat via type narrowing)Closes #2110
Test plan
pnpm tsgopasses (no new type errors)pnpm formatpassespnpm lintpasses🤖 Generated with Claude Code