Use Responses API with Luna by default

This commit is contained in:
Carlos Escalante
2026-07-14 21:48:54 -06:00
parent b57a899634
commit 301a0b687a
7 changed files with 23 additions and 7 deletions

View File

@@ -3,7 +3,7 @@
from __future__ import annotations
from agent_framework import Agent
from agent_framework.openai import OpenAIChatCompletionClient
from agent_framework.openai import OpenAIChatClient
from app.config import settings
from app.agent.tools import TOOLS
@@ -83,7 +83,9 @@ Generative UI — render tools:
def build_agent() -> Agent:
client = OpenAIChatCompletionClient(
# Use the Responses API for every configured model. It preserves one tool
# transport across model changes and supports Luna's tool-result turns.
client = OpenAIChatClient(
api_key=settings.OPENAI_API_KEY,
model=settings.AGENT_MODEL,
)