Skip to content

Allow custom OpenAI model and base URL for LLM inference#731

Merged
timrogers merged 6 commits into
mainfrom
copilot/customize-openai-model-url
Jun 26, 2026
Merged

Allow custom OpenAI model and base URL for LLM inference#731
timrogers merged 6 commits into
mainfrom
copilot/customize-openai-model-url

Conversation

Copilot AI commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Currently, OpenAI-compatible inference is hardcoded to https://api.openai.com/v1 and gpt-5.4-mini. This change lets users override both via CLI flags or environment variables.

  • CLI: added --openai-model and --openai-base-url to submit-claim, submit-claims-from-csv, and submit-claims-from-directory.
  • Environment: OPENAI_MODEL and OPENAI_BASE_URL are read when flags are not provided.
  • LLM resolution: resolve_api_config now takes optional model and base URL, falling back to the existing defaults.
  • README: updated the LLM provider section to document the new options.

Example:

formanator submit-claim \
  --receipt-path receipt.jpg \
  --openai-api-key "$OPENAI_API_KEY" \
  --openai-model gpt-5.4 \
  --openai-base-url https://api.example.com/v1

Copilot AI and others added 5 commits June 26, 2026 07:32
Co-authored-by: timrogers <116134+timrogers@users.noreply.github.com>
Co-authored-by: timrogers <116134+timrogers@users.noreply.github.com>
Co-authored-by: timrogers <116134+timrogers@users.noreply.github.com>
Co-authored-by: timrogers <116134+timrogers@users.noreply.github.com>
Co-authored-by: timrogers <116134+timrogers@users.noreply.github.com>
Co-authored-by: timrogers <116134+timrogers@users.noreply.github.com>
Copilot AI changed the title Allow custom OpenAI model and base URL for LLM inference Clarify OpenAI-compatible inference arg descriptions and README provider docs Jun 26, 2026
Copilot AI requested a review from timrogers June 26, 2026 08:31
@timrogers timrogers changed the title Clarify OpenAI-compatible inference arg descriptions and README provider docs Allow custom OpenAI model and base URL for LLM inference Jun 26, 2026
@timrogers timrogers marked this pull request as ready for review June 26, 2026 08:55
@timrogers timrogers merged commit 25fb583 into main Jun 26, 2026
11 checks passed
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.

2 participants