Skip to content

providers: --lex-gpu, wired for when its tools land - #193

Merged
alpibrupa merged 2 commits into
mainfrom
providers/lex-gpu
Sep 25, 2026
Merged

alpibrupa merged 2 commits into
mainfrom
providers/lex-gpu

Conversation

@alpibrupa

Copy link
Copy Markdown
Contributor

Draft: depends on alpibrusl/lex-llm#64 for providers.lex_gpu_model / lex_gpu_local. CI here fails until that merges.

lex-gpu serves OpenAI chat completions from its own compiled Metal and CUDA kernels rather than llama.cpp or MLX. lex-llm drives that shape unchanged, so this is the ordinary nine-module wiring every other backend gets: a lex_gpu_agent() beside vllm_agent() in each agent, an arm in session.lex, a --lex-gpu flag in main.lex, and a README section.

It is chat-only today, and the README says so

lex-gpu accepts a tools list and silently drops it, so the model is never told the tools exist and its replies carry no tool_calls. The loop therefore never sees finish_reason: "tool_calls" and never dispatches — for a coding agent that means it will describe the work rather than do it. Asked to use an add tool, the model says as much itself:

"I don't see any add tool available in my environment... I should just answer the question directly since no such tool exists in my available tools."

So this is wiring landed ahead of the capability, on purpose. It starts working the moment lex-gpu does two things, neither of which needs a change on this side, because the wire shape does not move:

  1. render tools into the prompt in the form the chat template expects;
  2. split the <think> block out of content into reasoning_content.

It is a draft for that reason as much as the dependency — merge it when you want the flag present, or leave it until lex-gpu can actually hold a tool. It is placed in the README's "implemented in code" list, not the "run end-to-end against this repo" table, which is where it honestly belongs.

Checks

Run against the lex-llm branch locally (path override, reverted before commit):

  • all nine agent modules, src/server/session.lex and src/tui/main.lex type-check with no errors
  • lex fmt --check clean across the fourteen touched files
  • lex doc-sync --check: all targets current

🤖 Generated with Claude Code

lex-gpu serves OpenAI chat completions from its own compiled Metal and
CUDA kernels. lex-llm drives that shape unchanged, so this is the same
nine-module wiring every other backend gets: a lex_gpu_agent() beside
vllm_agent() in each agent, an arm in session.lex, a flag in main.lex.

It is chat-only today and the README says so plainly. lex-gpu accepts a
`tools` list and drops it, so the model is never told the tools exist and
its replies carry no tool_calls -- the loop never dispatches, which for a
coding agent means it describes work rather than doing it. The wiring
lands now so that it starts working the moment lex-gpu renders `tools`
into its prompt and splits <think> out of content; neither needs a change
on this side.

Depends on alpibrusl/lex-llm#64 for providers.lex_gpu_model and
lex_gpu_local, so CI fails here until that merges. Checked against that
branch locally: all nine agents, session.lex and main.lex type-check with
no errors, `lex fmt --check` is clean across the fourteen touched files,
and `lex doc-sync --check` reports all targets current.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@alpibrupa

Copy link
Copy Markdown
Contributor Author

CI failure here is exactly the dependency and nothing else: all 36 errors are unknown_identifier: providers...lex_gpu_model, from lex-code resolving lex-llm at main. Nothing else in the run fails. It goes green once alpibrusl/lex-llm#64 merges — that PR's own CI is passing.

The no-args help banner listed every provider flag except the one just
added. README said "nine provider backends" for a list of 8 named +
2 in the table = 10 (already undercounting by one before this branch).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@alpibrupa
alpibrupa marked this pull request as ready for review September 25, 2026 13:13
@alpibrupa
alpibrupa merged commit 29fcc7a into main Sep 25, 2026
1 check passed
@alpibrupa
alpibrupa deleted the providers/lex-gpu branch September 25, 2026 13:13
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.

1 participant