36 Commits
Author SHA1 Message Date
Sycun cfaa95d7bd refactor(runtime): remove Eino and make Pi the sole agent engine
Delete the Eino model adapters, callbacks, middleware, orchestration,
summarization and single-agent runner together with their dependencies.
Chat, batch tasks, workflow Agent nodes and sub-agents now share the Pi
runtime, and dispatch is a single code path instead of an engine switch.

Configuration migrates eino_middleware/eino_skills to runtime/skills and
drops the retired callback settings while old files still load. Settings,
i18n and docs describe Pi only. Also carry the Pi follow-up fixes: empty
required lists are omitted from tool schemas, historical tool results stay
with their call batch, model proxies work over HTTP/1.1, single-query
retrieval skips query expansion, and finalization docs match Pi lifecycle
events.
2026-11-12 17:55:36 +08:00
Sycun 35508eb614 feat(pi): add the Pi agent runtime with native workflow and retrieval engines
Introduce an isolated Node worker that hosts the Pi SDK while Go keeps
business state, permissions, MCP execution, evidence and delivery checks.
The worker is published per source fingerprint, streams events back to Go
and supports tool callbacks, cancellation, session resume and per-model
transport settings.

Agent dispatch, tool search, plan/task tools and migration controls are
wired on top of it: large tool catalogs load through Pi tool_search, the
conversation task board keeps its existing tools, and legacy mode/route
values still resolve. Workflow gains a native DAG with versioned JSON
checkpoints, and knowledge retrieval moves to native documents, splitter,
HTTP embeddings, vector search and reranking.
2026-11-12 17:55:33 +08:00
Ed1s0nZ 5feea8d3c3 fix(headers): isolate credentials across audit, redirects and probes 2026-11-02 17:18:12 +08:00
nightslient 691dbd0107 test(headers): 覆盖自定义请求头注入与测试连接链路
- applyCustomHeaders:覆盖内置头、跳过空值、无配置时保持原行为
- headersRoundTripper:经 Eino 传输链端到端验证头已下发
- %session_id%:有会话时替换、无会话时跳过该头
- TestOpenAI:测试连接会携带静态头,%session_id% 填充探测值,
  未配置 headers 时仍使用 Bearer <api_key>
2026-10-30 20:16:27 +08:00
root d6b0aed1de feat(headers): 支持为 AI 渠道配置自定义 HTTP 请求头
部分 OpenAI 兼容供应商(如 opencode)要求私有鉴权头或会话头,
而非标准的 Authorization: Bearer,导致无法接入。

- config: OpenAIConfig / AIChannelConfig 新增 headers 字段,
  值支持 ${ENV_VAR}、${ENV_VAR:-default} 与 %session_id% 占位符
- openai: 新增 headersRoundTripper 接入 Eino ChatModel 传输链,
  同名的内置头(Authorization/User-Agent 等)可被覆盖
- openai: 内置 Client 的 4 处出站请求同样注入自定义头
- handler: 任务开始时把对话 ID 注入 ctx,供 %session_id% 替换;
  连接测试没有真实会话,使用探测值 connect-test
- web: 渠道设置页新增“自定义请求头”编辑区(每行 KEY=VALUE)
- 占位符使用 %session_id% 而非 {{session_id}},因为 index.html
  由 Go html/template 渲染,双花括号会被当作模板函数解析
2026-10-30 20:13:56 +08:00
Ed1s0nZ 5c5c5e199d fix(openai): preserve provider-specific reasoning disable intent (#366) 2026-10-21 15:43:53 +08:00
Sycun b3d3f48c40 feat: add detailed token usage monitoring and cache write metrics 2026-10-11 22:30:30 +08:00
Ed1s0nZ fd1c13a43d fix: normalize SSE error responses for Eino models 2026-09-14 16:34:22 +08:00
temp e4441f91ad fix: stabilize eino summarization for deepseek 2026-08-25 14:54:02 +08:00
temp d80e27e950 Respect OpenAI reasoning profile for DeepSeek-named models 2026-08-24 13:55:07 +08:00
公明 98c380ed5f Add files via upload 2026-08-18 20:31:48 +08:00
公明 55ee5fbac9 Delete internal directory 2026-08-18 20:14:29 +08:00
公明 b07a645d34 Add files via upload 2026-08-15 02:09:57 +08:00
公明 2910289f0b Delete internal directory 2026-08-15 01:54:26 +08:00
公明 9b78297442 Add files via upload 2026-08-15 01:46:12 +08:00
公明 dad14c55c1 Add files via upload 2026-07-24 18:10:52 +08:00
公明 88ca844c87 Add files via upload 2026-07-14 16:08:51 +08:00
公明 bc3246d157 Add files via upload 2026-07-10 16:51:06 +08:00
公明 f89ad1b42d Add files via upload 2026-06-30 16:00:00 +08:00
公明 15730d3ef4 Add files via upload 2026-06-19 00:01:20 +08:00
公明 2bdc9d4fe0 Add files via upload 2026-06-18 21:48:33 +08:00
公明 01b361e4a7 Add files via upload 2026-06-18 12:42:56 +08:00
公明 cf1f8515d9 Delete internal directory 2026-06-18 12:37:39 +08:00
公明 6d04753761 Add files via upload 2026-06-09 14:28:15 +08:00
公明 085c6a1c72 Add files via upload 2026-05-19 17:43:45 +08:00
公明 d2b6a154de Add files via upload 2026-05-11 19:54:40 +08:00
公明 a374c3950c Add files via upload 2026-05-10 00:55:20 +08:00
公明 1ab7e98f56 Add files via upload 2026-05-08 22:42:31 +08:00
公明 2558be3d7d Add files via upload 2026-04-29 22:38:14 +08:00
公明 b53cae3a02 Add files via upload 2026-04-28 11:37:52 +08:00
公明 26116b0822 Add files via upload 2026-04-21 19:16:09 +08:00
公明 a5e61947d3 Add files via upload 2026-04-19 01:17:09 +08:00
公明 5ef7618f44 Delete internal directory 2026-04-19 01:14:50 +08:00
donnelandClaude Opus 4.6 4442e7de30 feat: add Claude API bridge - transparent OpenAI-to-Anthropic protocol conversion
When provider is set to "claude" in config, all OpenAI-compatible API calls
are automatically bridged to Anthropic Claude Messages API, including:

- Non-streaming and streaming chat completions
- Tool calls (function calling) with full bidirectional conversion
- Eino multi-agent via HTTP transport hook (claudeRoundTripper)
- System message extraction, auth header conversion (Bearer → x-api-key)
- SSE stream format conversion (content_block_delta → OpenAI delta)
- TestOpenAI handler support for Claude connectivity testing

Zero impact when provider is "openai" or empty (default behavior unchanged).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 13:45:35 +08:00
公明 5fe5f5b71f Add files via upload 2026-03-20 01:03:40 +08:00
公明 8ffdbbae52 Add files via upload 2025-11-25 22:48:01 +08:00