Skip to content

The open source coding agent.

TypeScript

fix: agent value passed to chat.params and chat.headers hooks was not a string (#19996)

Aiden Cline9f3c2bd86169
diff --git a/packages/opencode/src/session/llm.ts b/packages/opencode/src/session/llm.ts
index c63fb180e0c..5cb609b2733 100644
--- a/packages/opencode/src/session/llm.ts
+++ b/packages/opencode/src/session/llm.ts
@@ -152,7 +152,7 @@ export namespace LLM {
"chat.params",
{
sessionID: input.sessionID,
- agent: input.agent,
+ agent: input.agent.name,
model: input.model,
provider,
message: input.user,
@@ -171,7 +171,7 @@ export namespace LLM {
"chat.headers",
{
sessionID: input.sessionID,
- agent: input.agent,
+ agent: input.agent.name,
model: input.model,
provider,
message: input.user,