generated from coulomb/repo-seed
Two small fixes informed by the 2026-05-18 live OpenRouter chapter-I run.
1. extract-entities templates (trading-literature and general-knowledge):
the # Entity Title placeholder was interpreted by gpt-4o-mini as a
literal heading prefix, so every entity came back as "# Entity Title:
Bucket Shop" etc. The instruction now spells the placeholder out
with concrete examples and an explicit "not the literal string"
note, so smaller models hit the intended shape.
2. generate plan grows --model <id>. When supplied, the cost estimate
pulls per-prompt and per-completion rates from the bundled
model_rates.yaml instead of multiplying a single blended
--cost-per-1k value across all tokens. The summary now also returns
a separate estimated_completion_tokens field plus a cost_source tag
("rate_table:<model>" | "cost_per_1k_blended" | None).
This is a stopgap. LLM-WP-0005 (proposed in llm-connect this round)
will move the rate registry and token-shape problem classes upstream
so consumers stop re-implementing them.
The live smoke ran 28k prompt tokens / 7.5k completion / $0.0088
actual. With --model openai/gpt-4o-mini the plan estimate now lands at
$0.0076 (within 14% of actual) versus the prior $8.40 estimate at
--cost-per-1k 0.30.
181 tests pass, 2 skipped (both live OpenRouter smokes).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
6.8 KiB
6.8 KiB