Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/ucode/agents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
status_subprocess_stdout,
)

from . import claude, codex, copilot, gemini, opencode, pi
from . import claude, codex, copilot, gemini, kilo, opencode, pi
from .args import LaunchOptions as LaunchOptions
from .args import explicit_model_arg_value as explicit_model_arg_value

Expand All @@ -50,6 +50,7 @@
"claude": claude,
"gemini": gemini,
"opencode": opencode,
"kilo": kilo,
"copilot": copilot,
"pi": pi,
}
Expand All @@ -68,6 +69,8 @@
"gemini": "gemini",
"gemini-cli": "gemini",
"opencode": "opencode",
"kilo": "kilo",
"kilocode": "kilo",
"copilot": "copilot",
"pi": "pi",
}
Expand Down Expand Up @@ -116,7 +119,7 @@ def normalize_tool(tool: str) -> str:
normalized = TOOL_ALIASES.get(tool.strip().lower())
if not normalized:
raise RuntimeError(
f"Unsupported tool '{tool}'. Use one of: codex, claude, gemini, opencode, copilot, pi."
f"Unsupported tool '{tool}'. Use one of: codex, claude, gemini, opencode, kilo, copilot, pi."
)
return normalized

Expand Down Expand Up @@ -444,6 +447,8 @@ def configure_tool(
result = copilot.write_tool_config(state, model)
elif tool == "pi":
result = pi.write_tool_config(state, model)
elif tool == "kilo":
result = kilo.write_tool_config(state, model)
else:
result = opencode.write_tool_config(state, model)
# gemini/opencode/copilot/pi return (state, token); codex/claude return state
Expand Down Expand Up @@ -485,7 +490,7 @@ def check_gateway_endpoint(state: dict, tool: str) -> bool:
"""V2-only: a tool is available iff we discovered models for it."""
if tool == "claude":
return bool(state.get("claude_models"))
if tool == "opencode":
if tool in ("opencode", "kilo"):
return bool(state.get("opencode_models"))
if tool == "codex":
return bool(state.get("codex_models"))
Expand All @@ -505,6 +510,7 @@ def check_gateway_endpoint(state: dict, tool: str) -> bool:
_TOOL_DISCOVERY_SOURCES: dict[str, tuple[str, ...]] = {
"claude": ("claude",),
"opencode": ("claude", "gemini", "oss"),
"kilo": ("claude", "gemini", "oss"),
"codex": ("codex",),
"gemini": ("gemini",),
"copilot": ("claude", "codex"),
Expand Down
Loading
Loading