fix: replace simulated AI response with real LLM client calls#51
Merged
JohnVictorCrown merged 1 commit intoFeb 14, 2026
Merged
Conversation
- Remove AgentStub placeholder and wire up real llm.Client in ChatSession - handleInitAgent now creates a real LLM client (OpenAI/Anthropic/Gemini) based on model name - handleQuery now calls llm.Client.Generate() instead of returning hardcoded string - API keys read from environment variables (LLM_API_KEY, OPENAI_API_KEY, etc.) - System prompt loaded from prompts package (unchanged) - Update server_test.go to reflect removed AgentStub
JohnVictorCrown
deleted the
session/agent_ee61815c-4b16-49ef-9fc0-2017ddde53c8
branch
February 14, 2026 01:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
handleQuerymethod inserver/server.gowas returning a hardcoded"Simulated AI response to: ..."string instead of making real LLM API calls. This PR fixes that by wiring up the actual LLM client.Changes
server/server.goAgentStubplaceholder struct that had no LLM functionalityllm.Client,llm.MessageHistory, andSystemPromptfields toChatSessionhandleInitAgent: Now creates a real LLM client (OpenAI, Anthropic, or Gemini) based on the model name provided in the init message. API keys are read from environment variables (LLM_API_KEY,OPENAI_API_KEY,ANTHROPIC_API_KEY,GEMINI_API_KEY)handleQuery: Replaced the simulated response with a real call tollm.Client.Generate(), maintaining message history and using the system prompt from thepromptspackageserver/server_test.goTestAgentStub→TestChatSessionFieldsto reflect the removedAgentStubtypeWhat was NOT changed
prompts/prompts.go) are untouchedllm/openai.go,llm/anthropic.go,llm/gemini.go) are untouchedBuilt for stellar.foundation.us by Kilo for Slack