Repository navigation
Move to RubyLLM 2.1 and GPT-6 Luna, with cost on every call - #188
Merged
Merged
Conversation
- ruby_llm 1.9.1 to 2.1.1, pinned ~> 2.1. The legacy acts_as deprecation warning is gone with the API it warned about. - The default model is gpt-6-luna: $0.10 input and $0.50 output per million tokens against gpt-4o-mini's $0.15 and $0.60 (OpenAI, 2026-10-14). LLM_DEFAULT_MODEL still overrides it. - Structured output is read through RubyLLM 2's `parsed`; the regex extraction stays as a fallback for JSON wrapped in prose. The curly-quote repair now matches real curly quotes (it held ASCII quotes and repaired nothing). - Each call logs its model, tokens and dollar cost, priced by RubyLLM's model registry, until Langfuse traces carry them. - Tests use real RubyLLM::Message replies and 2.x error constructors, and cover Luna's registry price and the usage line. - The brain: build notes on the RubyLLM 2 initiative, the model decision recorded there, and the pipeline, overview and state pages updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JEmikXtNoH7wAg6veTjbyT
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
~> 2.1. Theacts_asdeprecation warning on every boot is gone.gpt-6-luna, OpenAI's low-cost tier: $0.10 input, $0.01 cached and $0.50 output per million tokens, againstgpt-4o-mini's $0.15 and $0.60 (OpenAI pricing, read 2026-10-14). Batch and Flex halve it. Above 272K input tokens the long-context price applies.parsed; the regex extraction stays only as a fallback. The curly-quote repair now works; its character classes held plain ASCII quotes, so it never repaired anything.wiki/initiatives/rubyllm-2-upgrade.md; the AI pipeline, overview and state pages updated.Note for review
LLM_DEFAULT_MODELstill wins over the new default. The local.envsets it toclaude-opus-4-6, so development keeps generating with Claude Opus until that line is changed or removed. Whatever production sets will likewise stay in force. To run on Luna, remove the variable or set it togpt-6-luna.Test plan
test/services/ai/openai_queue_test.rb: 28 runs. Replies are realRubyLLM::Messageobjects, errors use the 2.xresponse:keyword, Luna's registry price is checked (100k in and out = $0.06), and the usage line is asserted.bin/rails test: 2462 runs, 5885 assertions, 0 failures, 0 errors; no deprecation warning.bin/rails test:system: 69 runs, 0 failures.tabula validate52 pages valid.🤖 Generated with Claude Code
https://claude.ai/code/session_01JEmikXtNoH7wAg6veTjbyT