Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Once a day, Formanator checks GitHub for a newer release. When one is available,
When submitting a claim you can either provide every detail manually or let an LLM infer them. Two providers are supported:

- **GitHub Copilot CLI** — _the default._ If you don't configure OpenAI, Formanator uses the [GitHub Copilot CLI](https://github.com/features/copilot/cli) for inference. Formanator detects the `copilot` binary on your `PATH` automatically; if it lives elsewhere, set the `COPILOT_CLI_PATH` environment variable or pass `--copilot-cli-path` with the path to the binary.
- **OpenAI** — billed to your OpenAI account. Set the `OPENAI_API_KEY` environment variable, or pass `--openai-api-key`.
- **OpenAI** — billed to your OpenAI account, using `gpt-5.4-mini` by default for receipt and category inference. Set the `OPENAI_API_KEY` environment variable, or pass `--openai-api-key`.

If both are configured, Formanator prefers OpenAI and otherwise falls back to the GitHub Copilot CLI.

Expand Down
2 changes: 1 addition & 1 deletion src/llm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use crate::forma::BenefitWithCategories;
use crate::verbose::is_enabled as is_verbose;

const OPENAI_BASE: &str = "https://api.openai.com/v1";
const OPENAI_MODEL: &str = "gpt-4o";
const OPENAI_MODEL: &str = "gpt-5.4-mini";

// Base-URL override for the LLM API. Production code never sets this; the
// integration tests in `tests/llm_api.rs` use it to point
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/llm_category_inference_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
],
"created": 1776763214,
"model": "gpt-4.1-2025-04-14",
"model": "gpt-5.4-mini",
"service_tier": "default",
"system_fingerprint": "fp_test0000",
"object": "chat.completion",
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/llm_receipt_inference_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
],
"created": 1776763374,
"model": "gpt-4.1-2025-04-14",
"model": "gpt-5.4-mini",
"service_tier": "default",
"system_fingerprint": "fp_test0000",
"object": "chat.completion",
Expand Down
6 changes: 3 additions & 3 deletions tests/llm_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ fn infer_category_and_benefit_errors_when_llm_returns_unknown_category() {
"id": "chatcmpl-test-bad-0001",
"object": "chat.completion",
"created": 1_745_000_000,
"model": "gpt-4.1-2025-04-14",
"model": "gpt-5.4-mini",
"choices": [{
"index": 0,
"message": {"role": "assistant", "content": "Total Nonsense"},
Expand Down Expand Up @@ -249,7 +249,7 @@ fn infer_all_from_receipt_rejects_invalid_date_format() {
"id": "chatcmpl-test-bad-date",
"object": "chat.completion",
"created": 1_745_000_000,
"model": "gpt-4.1-2025-04-14",
"model": "gpt-5.4-mini",
"choices": [{
"index": 0,
"message": {"role": "assistant", "content": inner},
Expand Down Expand Up @@ -281,7 +281,7 @@ fn infer_all_from_receipt_strips_markdown_code_fences() {
"id": "chatcmpl-test-fenced",
"object": "chat.completion",
"created": 1_745_000_000,
"model": "gpt-4.1-2025-04-14",
"model": "gpt-5.4-mini",
"choices": [{
"index": 0,
"message": {"role": "assistant", "content": inner},
Expand Down
Loading