Skip to content

fix(chat): route incident Ask AI through the tool-calling engine - #40

Merged
hellodk merged 1 commit into
mainfrom
fix/incident-chat-tools
Sep 19, 2026
Merged

hellodk merged 1 commit into
mainfrom
fix/incident-chat-tools

Conversation

@hellodk

@hellodk hellodk commented Sep 19, 2026

Copy link
Copy Markdown
Owner

The incident detail 'Ask AI' panel hit POST /api/v1/llm/ask — a single-shot
completion with zero cluster context. 'How many pods are affected?' could
only be answered with a request for kubectl output because the LLM had no
pod data to ground on.

Wire the panel onto the agentic POST /api/v1/chat engine (get_pods,
query_prometheus, list_incidents, ...). The backend now accepts incidentId:
the incident prompt + prior RCA summary are injected into the system context
(identical to handleAsk's grounding) and the namespace defaults from the
incident, so get_pods targets the right place. The panel renders tool chips
and citations, persists the server-side conversation id alongside history,
and aborts in-flight streams on unmount.

Closes #39

The incident detail 'Ask AI' panel hit POST /api/v1/llm/ask — a single-shot
completion with zero cluster context. 'How many pods are affected?' could
only be answered with a request for kubectl output because the LLM had no
pod data to ground on.

Wire the panel onto the agentic POST /api/v1/chat engine (get_pods,
query_prometheus, list_incidents, ...). The backend now accepts incidentId:
the incident prompt + prior RCA summary are injected into the system context
(identical to handleAsk's grounding) and the namespace defaults from the
incident, so get_pods targets the right place. The panel renders tool chips
and citations, persists the server-side conversation id alongside history,
and aborts in-flight streams on unmount.

Closes #39
@hellodk
hellodk merged commit 30bd4f1 into main Sep 19, 2026
2 checks passed
@hellodk
hellodk deleted the fix/incident-chat-tools branch September 19, 2026 04:59
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.

Rewire incident Ask AI panel to the tool-calling chat engine

1 participant