Native Claude subagents show the parent instance and a raw model slug when another instance lists the model

未关闭
#36,198 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@jcardama 已经在做这个了。

开始于 2026年11月13日。

  • #36204 来自 @jcardama —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
frontend

调研方向

Start with apps/web/src/components/chat/V2LifecycleRow.tsx (provider lookup by providerInstanceId) and packages/client-runtime/src/state/subagentDisplay.ts (resolveSelectableModel, catalogModel, formatModelSlugName fallback), then apps/web/src/components/chat/SubagentTooltipContent.tsx. Done means a native subagent whose model is only listed by another instance of the same driver shows that model's configured name and instance name and badge, while the no-match and multi-match cases keep current behavior. A linked open pull request (#36204) already targets this, so check it before starting.

由索引模型根据 Issue 内容生成。

描述

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/web

Steps to reproduce
  1. Add two claudeAgent instances that use the same Claude Code gateway (ANTHROPIC_BASE_URL):
    • claudeAgent, display name "Claude Code", with only the built-in Claude models.
    • claudeAgent-openai, display name "OpenAI", with the custom model { "slug": "gpt-6.1-sol", "name": "GPT 6.1 Sol" }.
  2. Add a Claude Code agent definition with model: gpt-6.1-sol in its frontmatter, for example gpt-6.1-sol-worker.
  3. In a thread on the claudeAgent instance, let Claude start a subagent of that type with the Agent tool.
  4. Hover the subagent row in the "N subagents" card.
Expected behavior

The row shows the model the subagent runs on with its configured name and the instance that lists that model: "GPT 6.1 Sol · OpenAI", with the OpenAI instance's badge.

Actual behavior

The row shows "GPT-6.1-Sol · Claude Code" with the Claude Code instance's badge:

  • The model label is the raw slug in title case, not the configured name "GPT 6.1 Sol".
  • The instance name and badge are those of the parent thread's instance, so a GPT model reads as part of the Claude group.
Cause

A native subagent keeps its parent's providerInstanceId. The row looks up the provider by that ID, and resolveSubagentMetadata looks for the model only in that provider's catalog. When the parent's catalog does not contain the slug, the label falls back to formatModelSlugName. The tooltip then takes the instance name and badge from the same parent instance. Code references are in the notes below.

Suggestion

When the parent instance's catalog does not contain the subagent's model, look the slug up in the other instances that use the same driver. If exactly one instance lists it, use that instance's model name, display name, accent color, and (after #26236) icon. Keep the current behavior when no instance or more than one instance lists the slug.

Related: per-instance icons are tracked in discussion #7366 and PR #26236. This issue is only about which instance and model name a native subagent row shows.

Impact

Cosmetic issue

Version or commit

0.1.10-nightly.20261111.4544 (server on Linux; web and desktop clients on Windows and macOS). The code is unchanged on main at f313d0a6cb.

Notes

References at main f313d0a6cb:

  • apps/web/src/components/chat/V2LifecycleRow.tsx:567-573: provider={providers.find((provider) => provider.instanceId === props.providerInstanceId)}. For a provider_native subagent, providerInstanceId is the parent's instance.
  • packages/client-runtime/src/state/subagentDisplay.ts:70-79: resolveSelectableModel and catalogModel search only input.provider.models. On a miss, the label is formatModelSlugName(model).
  • apps/web/src/components/chat/SubagentTooltipContent.tsx:107-139: the icon, accent color, and ${modelLabel} · ${entry.displayName} all come from props.provider.instanceId.

The subagent record reports model: "gpt-6.1-sol", and the slug is present as a custom model in the claudeAgent-openai catalog, so a lookup across instances would find it.

主要语言
TypeScript
星标
24.8k
派生
6.4k
平均合并
59 分钟
30 天内合并 PR
418

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pingdotgg/t3code 的其他 Issue

查看 pingdotgg/t3code 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。