fix(agents): sessions_spawn inherits provider (#528)
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
- Models/Auth: add MiniMax Anthropic-compatible API onboarding (minimax-api). (#590) — thanks @mneves75
|
- Models/Auth: add MiniMax Anthropic-compatible API onboarding (minimax-api). (#590) — thanks @mneves75
|
||||||
- Models: centralize model override validation + hooks Gmail warnings in doctor. (#602) — thanks @steipete
|
- Models: centralize model override validation + hooks Gmail warnings in doctor. (#602) — thanks @steipete
|
||||||
- Agents: avoid base-to-string error stringification in model fallback. (#604) — thanks @steipete
|
- Agents: avoid base-to-string error stringification in model fallback. (#604) — thanks @steipete
|
||||||
|
- Agents: `sessions_spawn` inherits the requester's provider for child runs (avoid WhatsApp fallback). (#528) — thanks @rlmestre
|
||||||
- Agents: treat billing/insufficient-credits errors as failover-worthy so model fallbacks kick in. (#486) — thanks @steipete
|
- Agents: treat billing/insufficient-credits errors as failover-worthy so model fallbacks kick in. (#486) — thanks @steipete
|
||||||
- Auth: default billing disable backoff to 5h (doubling, 24h cap) and surface disabled/cooldown profiles in `models list` + doctor. (#486) — thanks @steipete
|
- Auth: default billing disable backoff to 5h (doubling, 24h cap) and surface disabled/cooldown profiles in `models list` + doctor. (#486) — thanks @steipete
|
||||||
- Commands: harden slash command registry and list text-only commands in `/commands`.
|
- Commands: harden slash command registry and list text-only commands in `/commands`.
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ describe("subagents", () => {
|
|||||||
const params = request.params as {
|
const params = request.params as {
|
||||||
message?: string;
|
message?: string;
|
||||||
sessionKey?: string;
|
sessionKey?: string;
|
||||||
|
provider?: string;
|
||||||
timeout?: number;
|
timeout?: number;
|
||||||
};
|
};
|
||||||
const message = params?.message ?? "";
|
const message = params?.message ?? "";
|
||||||
@@ -67,6 +68,7 @@ describe("subagents", () => {
|
|||||||
childRunId = runId;
|
childRunId = runId;
|
||||||
childSessionKey = sessionKey;
|
childSessionKey = sessionKey;
|
||||||
sessionLastAssistantText.set(sessionKey, "result");
|
sessionLastAssistantText.set(sessionKey, "result");
|
||||||
|
expect(params?.provider).toBe("discord");
|
||||||
expect(params?.timeout).toBe(1);
|
expect(params?.timeout).toBe(1);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
@@ -155,10 +157,16 @@ describe("subagents", () => {
|
|||||||
const agentCalls = calls.filter((call) => call.method === "agent");
|
const agentCalls = calls.filter((call) => call.method === "agent");
|
||||||
expect(agentCalls).toHaveLength(2);
|
expect(agentCalls).toHaveLength(2);
|
||||||
const first = agentCalls[0]?.params as
|
const first = agentCalls[0]?.params as
|
||||||
| { lane?: string; deliver?: boolean; sessionKey?: string }
|
| {
|
||||||
|
lane?: string;
|
||||||
|
deliver?: boolean;
|
||||||
|
sessionKey?: string;
|
||||||
|
provider?: string;
|
||||||
|
}
|
||||||
| undefined;
|
| undefined;
|
||||||
expect(first?.lane).toBe("subagent");
|
expect(first?.lane).toBe("subagent");
|
||||||
expect(first?.deliver).toBe(false);
|
expect(first?.deliver).toBe(false);
|
||||||
|
expect(first?.provider).toBe("discord");
|
||||||
expect(first?.sessionKey?.startsWith("agent:main:subagent:")).toBe(true);
|
expect(first?.sessionKey?.startsWith("agent:main:subagent:")).toBe(true);
|
||||||
expect(childSessionKey?.startsWith("agent:main:subagent:")).toBe(true);
|
expect(childSessionKey?.startsWith("agent:main:subagent:")).toBe(true);
|
||||||
|
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ export function createSessionsSpawnTool(opts?: {
|
|||||||
params: {
|
params: {
|
||||||
message: task,
|
message: task,
|
||||||
sessionKey: childSessionKey,
|
sessionKey: childSessionKey,
|
||||||
|
provider: opts?.agentProvider,
|
||||||
idempotencyKey: childIdem,
|
idempotencyKey: childIdem,
|
||||||
deliver: false,
|
deliver: false,
|
||||||
lane: "subagent",
|
lane: "subagent",
|
||||||
|
|||||||
Reference in New Issue
Block a user