feat(p2p,realtime,functions,model): A级任务大更新 — p2p节点快照/reasoning解析器/realtime ephemeral key/分布式缓存#10311
feat(p2p,realtime,functions,model): A级任务大更新 — p2p节点快照/reasoning解析器/realtime ephemeral key/分布式缓存#10311ghshhf wants to merge 9 commits into
Conversation
…altime ephemeral key/分布式缓存 - A1: NodeConfig 结构体 + discoveryTunnels 全节点快照 + ReplaceNodes - A2: XMLToolCallFormat 三字段扩展 + ParseMsgWithXMLToolCalls reasoning 支持 - A3: RealtimeSessions 60s HMAC 短期令牌 + transcription 模型可选 + any-to-any 判定 - A4: replicaCache 分布式缓存层,减少重复 FindAndLockNodeWithModel DB 调用 - 附带: metrics/monitoring/worker/templates/mcp httpapi 相关完善
|
Thanks @ghshhf. There's useful work here (the Please open an issue first for changes this large. This bundles ~7 unrelated features into one squash. Anything touching P2P, auth, or the distributed hot path needs a design discussion before the code. Split it into one PR per concern. Blockers:
Minor on the realtime keys (HMAC itself is sound): not actually single-use despite the comment, the signed Last thing: the comment style suggests AI assistance — fine, but per .agents/ai-coding-assistants.md it needs an If you want to proceed: open an issue, then start with the uncontroversial subset (config-yaml endpoint, OTel shutdown, context plumbing) as a small first PR. |
… error The Security Scan workflow was failing on fork PRs because the workflow does not have permission to upload SARIF files to the GitHub Security tab when running from a fork. This change adds '!github.repository.fork' checks to all steps to prevent the workflow from running on fork repositories. This fix should be applied to the main repository so that all forks inherit the correct configuration. Fixes mudler#10322, mudler#10318, mudler#10320, mudler#10321
- Replace 18 event_TODO placeholders with uuid.New().String() in realtime endpoints - Mount TokenMetricsEndpoint at POST /v1/tokenMetrics route - Add PCM format support to AudioConvert (ffmpeg) - Implement capability filtering in HTTP MCP client ListInstalledModels - Use standard TraceMiddleware on backend monitor routes
- get_token_metrics.go: endpoint is actually registered in routes - dashboard.go: token validation is already implemented via base64 decode
…odeConfig tests - realtime.go: remove `PreviousItemID: "TODO"` placeholder that leaked into the API response, matching the client-initiated commit behavior - p2p_test.go: add 17 tests covering NewNodeConfigFromEnv, GenerateToken, generateNewConnectionData, nodeID, stringsToMultiAddr, AddNode, GetNode, GetAvailableNodes, ReplaceNodes, and default service ID handling
Covers isTemplateFile, NewTemplateLoader, ListTemplates (empty dir, multiple files, hidden files, directories, non-tmpl files, nonexistent dir, caching, invalidate, concurrent access), Resolve (existing, with/without .tmpl suffix, non-existent, empty dir, path traversal), and Invalidate (cache clear, concurrent).
Before committing each VAD-detected utterance, trim audio samples before the speech onset (from segments[0].Start) down to at most the configured prefix_padding_ms. This prevents long stretches of silence from being included in the transcribed audio.
- realtime.go: replace XXX comment with design note; add conversation.LastItemID() helper to replace hardcoded 'TODO' PreviousItemID; messageItemID() helper for ID extraction - evaluator.go: remove stale TODO comment about continue statement - video.go: implement content-type-based extension detection instead of hardcoding .mp4; added videoExtFromContentType helper - chat.go: clarify TODO about jinja template parsing as design note - schema/request.go: remove dead code and unnecessary TODO
# Conflicts: # core/http/endpoints/openai/realtime.go
变更摘要
P2P
Reasoning 解析器
Realtime API
分布式缓存
附带
测试