os-me: catch llm-stack BadReply and move to decision-model on llm-stack #1474

Open
opened 2026-10-29 17:56:43 +00:00 by jared · 1 comment
Owner

Problem

os-me uses decision-model, and decision-model#11 moves it onto llm-stack LLM::Client#decide.
llm-stack raises LLM::Http::Errors::BadReply where decision-model raised ResponseError for a bad provider reply.
plugins/os-me/lib/os_me/lever_run.rb:43 rescues only Decision::Model::ResponseError.
After #11, a bad reply is no longer rescued, and os-me stops catching it silently.
cc-os also locks decision-model at 0.2.0 in Gemfile.lock, and decision-model drops version numbers.

Blocked by: jared/decision-model#11

Approach

Required work:

  1. In plugins/os-me/lib/os_me/lever_run.rb:43, make rescue Decision::Model::ResponseError also catch LLM::Http::Errors::BadReply — check: present LLM::Http::Errors::BadReply in plugins/os-me/lib/os_me/lever_run.rb
  2. Keep the ResponseError raise in plugins/os-me/lib/os_me/headless_result.rb:12.
  3. Update Gemfile.lock (locked at decision-model 0.2.0) to the #11 ref:, and update the matching Gemfile entry.
  4. Update the docs at plugins/os-me/skills/decision-model/SKILL.md:107-113 and plugins/os-me/eval/row_labels/README.md:34 to the new error names.

Acceptance criteria

  1. Given a lever run where the provider returns a bad reply, when llm-stack raises LLM::Http::Errors::BadReply, then the lever run rescues it and does not raise.
  2. Given HeadlessResult gets an unusable reply, when it raises ResponseError, then the lever run still rescues it.
  3. Given Gemfile.lock, when bundler resolves, then decision-model comes from the #11 ref:.

Owner sketch

OsMe::LeverRun rescues both Decision::Model::ResponseError and LLM::Http::Errors::BadReply.

Non-goals

Replacing HeadlessClaude. That work is jared/cc-os#1471.


Discoverer: /home/jared/dev/ruby-gems/decision-model (worktree ticket-11), session 4dc4e6fe-637f-4ccb-bed0-958ba608ffe3, 2026-10-29. os-me depends on decision-model error classes that #11 changes.

## Problem os-me uses decision-model, and decision-model#11 moves it onto llm-stack `LLM::Client#decide`. llm-stack raises `LLM::Http::Errors::BadReply` where decision-model raised `ResponseError` for a bad provider reply. `plugins/os-me/lib/os_me/lever_run.rb:43` rescues only `Decision::Model::ResponseError`. After #11, a bad reply is no longer rescued, and os-me stops catching it silently. cc-os also locks decision-model at 0.2.0 in `Gemfile.lock`, and decision-model drops version numbers. Blocked by: jared/decision-model#11 ## Approach Required work: 1. In `plugins/os-me/lib/os_me/lever_run.rb:43`, make `rescue Decision::Model::ResponseError` also catch `LLM::Http::Errors::BadReply` — check: present `LLM::Http::Errors::BadReply` in `plugins/os-me/lib/os_me/lever_run.rb` 2. Keep the `ResponseError` raise in `plugins/os-me/lib/os_me/headless_result.rb:12`. 3. Update `Gemfile.lock` (locked at decision-model 0.2.0) to the #11 `ref:`, and update the matching Gemfile entry. 4. Update the docs at `plugins/os-me/skills/decision-model/SKILL.md:107-113` and `plugins/os-me/eval/row_labels/README.md:34` to the new error names. ## Acceptance criteria 1. Given a lever run where the provider returns a bad reply, when llm-stack raises `LLM::Http::Errors::BadReply`, then the lever run rescues it and does not raise. 2. Given `HeadlessResult` gets an unusable reply, when it raises `ResponseError`, then the lever run still rescues it. 3. Given `Gemfile.lock`, when bundler resolves, then decision-model comes from the #11 `ref:`. ## Owner sketch `OsMe::LeverRun` rescues both `Decision::Model::ResponseError` and `LLM::Http::Errors::BadReply`. ## Non-goals Replacing `HeadlessClaude`. That work is jared/cc-os#1471. -------- **Discoverer:** /home/jared/dev/ruby-gems/decision-model (worktree ticket-11), session 4dc4e6fe-637f-4ccb-bed0-958ba608ffe3, 2026-10-29. os-me depends on decision-model error classes that #11 changes.
Author
Owner

decision-model#11 landed as commit 962bfe9 on main (pin ref: "962bfe9"). CloudflareJev.build now takes credentials: (a Hash with account_id, api_token) instead of account:. Adapters take client: (an LLM::Client).

decision-model#11 landed as commit 962bfe9 on main (pin `ref: "962bfe9"`). `CloudflareJev.build` now takes `credentials:` (a Hash with account_id, api_token) instead of `account:`. Adapters take `client:` (an `LLM::Client`).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#1474
No description provided.