Skip to content

fix(config): add conversation agent to api.yaml to fix release gate CI#205

Merged
Colin4k1024 merged 1 commit into
mainfrom
fix/release-gates-conversation-agent
May 27, 2026
Merged

fix(config): add conversation agent to api.yaml to fix release gate CI#205
Colin4k1024 merged 1 commit into
mainfrom
fix/release-gates-conversation-agent

Conversation

@Colin4k1024
Copy link
Copy Markdown
Owner

问题

Release Gates CI 的性能测试全部返回 HTTP 404 {"error":"Agent not found"}

根因

configs/api.yaml(API 二进制实际加载的配置文件)中没有 agents: 段,导致:

  1. bootstrap.Config.Agents.Agents 为空 map
  2. app.golen(bootstrap.Config.Agents.Agents) > 0 的守卫条件失败
  3. RegisterConfiguredAgents()agentFactory.GetOrCreateFromConfig() 均被跳过
  4. v1 runtime.Manager 中无任何 agent 注册
  5. AgentMessage() handler 调用 manager.Get("conversation") 返回 nil → 返回 404

注意:configs/agents.yaml 虽然定义了 conversation agent,但 LoadAPIConfigWithModel() 只加载 api.yaml + model.yaml不自动加载 agents.yaml

修复

configs/api.yaml 末尾追加 agents: 段,注册 conversation agent(type: react)。

API 启动时 RegisterConfiguredAgents() 会在 v1 manager 中注册该 agent,AgentMessage() 返回 HTTP 202。

验证路径

CI 性能测试流程:

POST /api/agents/conversation/message
→ handler.agentManager.Get("conversation") → 找到 ✓
→ createJob()
→ return HTTP 202 with job_id ✓

…erf test

Root cause: configs/api.yaml had no agents: section, so bootstrap.Config.Agents.Agents
was empty and the len > 0 guard skipped RegisterConfiguredAgents(). As a result,
manager.Get("conversation") returned nil and AgentMessage() returned HTTP 404.

Fix: add agents.agents.conversation (type react) directly in api.yaml so the v1
runtime manager registers it at startup and perf test requests receive HTTP 202.
Copilot AI review requested due to automatic review settings May 27, 2026 07:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Release Gates CI performance tests failing with HTTP 404 {"error":"Agent not found"} by ensuring the API’s primary runtime config (configs/api.yaml) includes an agents section registering the conversation agent, so POST /api/agents/conversation/message can resolve the agent and return 202 instead of 404.

Changes:

  • Add an agents.agents.conversation entry to configs/api.yaml so the API registers the conversation agent at startup.

Comment thread configs/api.yaml
@Colin4k1024 Colin4k1024 merged commit 9c9feec into main May 27, 2026
8 checks passed
@Colin4k1024 Colin4k1024 deleted the fix/release-gates-conversation-agent branch May 27, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants