feat: agent-sdk observability + Kimi K2.6 + UI test buttons (beta.13)#134
Merged
luokerenx4 merged 5 commits intomasterfrom Apr 21, 2026
Merged
feat: agent-sdk observability + Kimi K2.6 + UI test buttons (beta.13)#134luokerenx4 merged 5 commits intomasterfrom
luokerenx4 merged 5 commits intomasterfrom
Conversation
The lock flag `userScrolledUp` is now driven only by user-intent events (wheel, touchmove, touchend, the floating scroll-to-bottom button). onScroll is demoted to pure UI state — it updates showScrollBtn and newMsgCount but no longer writes userScrolledUp. Previously onScroll reset the flag whenever post-scroll distance fell below the threshold, which during streaming undid the synchronous wheel/touchmove lock before the next auto-scroll could see it. Moving the unlock transition to a rAF-deferred distance check inside the wheel-down / touchend handlers keeps all transitions on the same user-input timeline. Does not yet fully resolve the user-reported symptom — bug still reproduces under streaming. Committed as a structural step before further investigation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Moonshot released Kimi K2.6 on 2026-04-13 (1T params, stronger coding + agent planning than K2.5). Makes kimi-k2.6 the default; keeps kimi-k2.5 in the dropdown as a fallback option. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Creation already had a Test Connection step; editing and the profile list didn't — once a profile was saved, the only way to verify it was to send a real chat and wait. Adds two entry points: - Each profile card in the list gets a one-click Test button with transient status (testing → OK / Failed → back to idle). Failure hover shows the error message. - The Edit modal gains a Test button alongside Save, mirroring the Create modal's inline result display so edits can be verified before committing. Both reuse the existing POST /api/config/profiles/test endpoint and agentCenter.testWithProfile() path — no backend changes needed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… doc
Three changes that hang together as "be able to prove where a request
actually went":
- Result event metadata is now logged in full (model, usage, cost,
sessionId) to pino, plus a one-liner console.info per turn:
[agent-sdk] result: model=kimi-k2.6 subtype=success in=... out=...
When the server doesn't echo a model field, the line reads
model=(unreported) — useful as an early tell for proxy-shaped paths.
- ALICE_SDK_DEBUG=1 toggles a deeper debug path: injects
DEBUG_CLAUDE_AGENT_SDK into the spawned CLI and streams its stderr
into logs/agent-sdk-debug.log, prefixed with a per-request separator
(timestamp / loginMethod / model / baseUrl). Surfaces every outbound
URL the CLI hits, which is the only reliable way to verify routing
when fake-IP proxies sit in front of the network layer.
- docs/agent-sdk-notes.md captures the integration contract:
- what env vars the CLI actually honors (and what CLAUDE_CODE_SIMPLE
really does — it strips CLI extras, not auth mode)
- which endpoints stay hardcoded to api.anthropic.com regardless of
ANTHROPIC_BASE_URL (telemetry, MCP discovery, org metrics, MCP
proxy) — none of them do LLM inference, but metadata leaks are a
known given, not a bug on our side
- the error classifier's purpose and the debug workflow
- a "cosplay" note for Kimi K2.x: the model happily identifies as
Claude under persona prompts; verify routing via debug log before
concluding anything is misrouted
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (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
ALICE_SDK_DEBUG=1flag turns onDEBUG_CLAUDE_AGENT_SDKand pipes the spawned CLI's stderr tologs/agent-sdk-debug.log, which is the only reliable way to verify routing when a fake-IP proxy sits in front of the network layer.docs/agent-sdk-notes.md— integration contract for the@anthropic-ai/claude-agent-sdkbackend: what env vars matter, whatCLAUDE_CODE_SIMPLEactually does (strips CLI extras, not auth mode), which endpoints stay hardcoded toapi.anthropic.comregardless ofANTHROPIC_BASE_URL, the error classifier, and a "cosplay" caveat for Kimi K2.x (model happily identifies as Claude under persona prompts; verify routing via debug log before concluding anything is misrouted).0.9.0-beta.13.Test plan
npx tsc --noEmitcleanpnpm test— 1088 tests passALICE_SDK_DEBUG=1, inspectedlogs/agent-sdk-debug.log— confirmed main generation hitsapi.moonshot.ai, only hardcoded management paths hitapi.anthropic.com🤖 Generated with Claude Code