Skip to content

chore: default OpenAI model to gpt-6-luna - #97

Merged
eshaffer321 merged 1 commit into
mainfrom
chore/default-gpt-6-luna
Sep 24, 2026
Merged

eshaffer321 merged 1 commit into
mainfrom
chore/default-gpt-6-luna

Conversation

@eshaffer321

@eshaffer321 eshaffer321 commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

Switches the default OpenAI categorizer model from gpt-5.6-luna to gpt-6-luna, which is cheaper on the API:

Per 1M tokens (standard, short context) gpt-5.6-luna gpt-6-luna
Input $0.20 $0.10
Cached input $0.02 $0.01
Output $1.20 $0.50

Source: OpenAI API pricing

Bug fix included

The categorizer only treated models starting with gpt-5 as reasoning models. Any gpt-6-* model fell through to the other branch and was sent temperature: 0.1 instead of reasoning_effort: "low". isGPT5Model is replaced by isReasoningModel, which treats GPT generation 5 and later as reasoning models.

  • New test: TestIsReasoningModel. Its gpt-6 cases failed against the old check and pass now.
  • Logged in docs/bug-fixes.md.

Changes

  • Default model updated in config.go, categorizer.go, config.yaml, README.md, AGENTS.md, and .env.example
  • Config tests updated to expect the new default

OPENAI_MODEL still overrides the default, so OPENAI_MODEL=gpt-5.6-luna switches back.

Testing

  • go test ./... -race passes
  • go vet and golangci-lint are clean (pre-commit hook)
  • Rebased onto feat!: require Monarch session cookie auth #96 (cookie auth). walmart -dry-run with gpt-6-luna matched and categorized 2 orders end to end. The third order hasn't posted in Monarch yet.
  • Live API check: gpt-6-luna with reasoning_effort: "low" returns valid JSON categorizations. The old request shape is rejected: 'temperature' does not support 0.1 with this model, which confirms the bug.

@codecov

codecov Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.99%. Comparing base (c97b7e0) to head (f296d3c).

Files with missing lines Patch % Lines
internal/domain/categorizer/categorizer.go 80.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #97   +/-   ##
=======================================
  Coverage   64.98%   64.99%           
=======================================
  Files          51       51           
  Lines        6983     6990    +7     
=======================================
+ Hits         4538     4543    +5     
- Misses       2107     2108    +1     
- Partials      338      339    +1     
Flag Coverage Δ
unittests 64.99% <81.81%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
internal/infrastructure/config/config.go 81.08% <100.00%> (ø)
internal/domain/categorizer/categorizer.go 87.91% <80.00%> (-0.82%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

GPT-6 Luna is half the input price of gpt-5.6-luna ($0.10 vs $0.20 per
1M tokens) and ~58% cheaper on output ($0.50 vs $1.20), per the OpenAI
API pricing page.

Also fixes reasoning-model detection: the categorizer only treated
`gpt-5*` as a reasoning model, so any `gpt-6-*` model would have been
sent `temperature` instead of `reasoning_effort`. isGPT5Model is
replaced by isReasoningModel, which treats GPT generation >= 5 as a
reasoning model. Covered by TestIsReasoningModel and logged in
docs/bug-fixes.md.
@eshaffer321
eshaffer321 force-pushed the chore/default-gpt-6-luna branch from 1d11f5b to f296d3c Compare September 24, 2026 12:24
@eshaffer321
eshaffer321 merged commit 82e976b into main Sep 24, 2026
14 checks passed
@eshaffer321
eshaffer321 deleted the chore/default-gpt-6-luna branch September 24, 2026 12:28
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