Skip to content

Fixes for 2026.9.2: OpenAI-compatible endpoints, and issues found in a live run - #146

Merged
thekannen merged 5 commits into
betafrom
fix/openai-base-url
Oct 20, 2026
Merged

thekannen merged 5 commits into
betafrom
fix/openai-base-url

Conversation

@thekannen

@thekannen thekannen commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Fixes for the 2026.9.2 release, landing on beta first. Also brings main's source-map-js security bump (#135) into beta.

OpenAI-compatible endpoints (closes #140)

  • Settings → AI → More has an OpenAI-compatible address (OPENAI_BASE_URL). Empty means OpenAI. The provider option is now labeled "OpenAI or compatible".
  • Test OpenAI and Load models call the configured address. Before, both were hard-coded to api.openai.com, so a working LiteLLM setup failed the test with a 401. With a gateway, Load models lists every model it offers rather than OpenAI's recommended subset. The address goes through the same URL checks as the Ollama address (private LAN addresses allowed, cloud metadata blocked).
  • Because OPENAI_BASE_URL is now a Settings key, it reaches jobs started from the web UI. Setting it on the container works too, so the /app/.env workaround from the issue is no longer needed.

From #127

  • Discover retries that never expired. An import that times out on one URL while Mealie answers everything else now uses up an attempt, so after the retry limit the URL is set aside. Connection errors and 502/503/504 still don't count against a URL. If Mealie is struggling overall, the circuit breaker stops the run after a few failures, so this can't burn through many URLs' attempts.
  • Shouted names in any script. Detection of all-caps words ("EINFACHER APFELKUCHEN", "ПРОСТОЙ БОРЩ") no longer relies on [A-Z]. A single acronym like "BBQ Ribs" still isn't flagged.
  • Renames that collide with an existing name. This answers the first open question in Failure-path follow-ups: Mealie slug on rename, slug swaps, never-expiring retries #127: Mealie answers 400 Recipe already exists for a name another recipe has, even when CookDex sends a free -2 slug. A live name cleanup from Tools or an automation tried those renames anyway and failed the whole job. They're now skipped, the run details give the reason, the summary counts them as "Skipped (name taken)", and the first of two renames that want the same name still goes through.

Found in a live run against a 12,000-recipe Mealie

Every job was run as a preview and then live against a real library: 12,170 recipes on Mealie develop, with backups taken first. These came out of it:

  • Backup wait default is now 30 minutes. The library's backup took 14m17s against the old 15-minute default, close enough that a slightly bigger library would fail every "back up first" run. A value someone saved stays as it is.
  • "Missing servings" no longer offers "Fill in". The Library counted recipes with no servings or yield text at all, and its button opened the yield job, which only fixes text and numbers that disagree. On this library that was 660 counted and 1 fixed. The finding now explains it and has no button.
  • No sign-in flash. Each load showed the sign-in form until the session check returned. The app now renders an empty shell until it knows.
  • Backup summary. "Kept: 7" was the keep setting, not a count (the log said "kept 2"). It now reads "Keeps up to: 7".
  • The Organize page's backup notice says a backup can take 15 minutes or more on a large library, not "a few minutes".

Docs

  • AI provider page: the OpenAI-compatible address.
  • Settings / backups: the 30-minute default for "Wait for a Mealie backup".
  • Ingredient parser: Mealie's parser takes about 8 s per recipe, so 2,000 recipes take hours. Use "At most this many recipes" or a schedule.
  • Discover: a preview shows examples. A live run shuffles pages, so it can import different ones.

Verification

  • pytest: 854 passed, 10 skipped. ruff check src tests is clean.
  • npm --prefix web test: 67/67. npm --prefix web run build succeeds.
  • scripts/qa/run_local_webui_qa.py --iterations 1: passed with 16 checks.
  • Docker image on a real library. Library scan, health check, recipe cleanup (dedup, junk, names), tag and category duplicates, yield, slug repair, rule tagging, foods and units cleanup, ingredient parsing (50 recipes), re-import (5), Discover (one source, 3 imports), Mealie backup, and the nightly-backup automation. Each ran as a preview, then live. Settings, Organize, the Library and run details were checked in a browser. After the fixes, a rerun of the live name cleanup skipped the 17 colliding names with reasons and succeeded.

🤖 Generated with Claude Code

dependabot Bot and others added 5 commits October 20, 2026 10:45
…ry (#135)

Bumps the npm_and_yarn group with 1 update in the /web directory: [source-map-js](https://github.com/7rulnik/source-map-js).


Updates `source-map-js` from 1.2.1 to 1.2.2
- [Release notes](https://github.com/7rulnik/source-map-js/releases)
- [Changelog](https://github.com/7rulnik/source-map-js/blob/main/CHANGELOG.md)
- [Commits](7rulnik/source-map-js@v1.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: source-map-js
  dependency-version: 1.2.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Settings gains OPENAI_BASE_URL (AI > More). Test and Load models call
  it instead of api.openai.com, and as a catalog key it now reaches jobs
  started from the web UI, including when set on the container (#140).
- Discover counts a per-URL timeout toward the retry limit, so a page
  that always times out is set aside (#127).
- Shouted-name detection works in any script, not only A-Z (#127).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Live name cleanup skips renames to a name another recipe has; Mealie
  rejects them ("Recipe already exists") whatever slug is sent, which
  failed the whole job (#127).
- Mealie backup wait defaults to 30 minutes (a 12k library took 14).
- The Library's missing-servings finding drops "Fill in": the yield job
  can't fill recipes with no servings or yield text at all.
- No flash of the sign-in form while the session check runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… keep

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thekannen thekannen changed the title OpenAI-compatible endpoints in Settings, and two Discover/name fixes Fixes for 2026.9.2: OpenAI-compatible endpoints, and issues found in a live run Oct 20, 2026
@thekannen
thekannen merged commit 24cdbaf into beta Oct 20, 2026
9 checks passed
@thekannen
thekannen deleted the fix/openai-base-url branch October 20, 2026 16:32
thekannen added a commit that referenced this pull request Oct 20, 2026
* Point the in-app Help page at the CookDex docs site (#145)

* Point the in-app Help page at the CookDex docs site

The Help page carried a third copy of the user docs (places, setup
guides, job guides, FAQ, troubleshooting) in web/src/constants.js.
Replace it with a short intro per topic and links to the matching page
on https://knownframe.com/cookdex/docs/, keeping the first-run steps,
the diagnostics report and "Open a GitHub issue" in the app.

- Help and About get a Documentation link (also in aboutMeta.links.docs).
- Each job's sheet in Tools links to its section of the task reference;
  a test keeps that map in step with the task registry.
- Remove GET /help/docs. It read docs/ files the Docker image excludes,
  so it always returned nothing, and no page called it.
- The smoke test checks the docs links instead of the old accordions.

Closes #143

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Screenshots for the pull request (removed in the next commit)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Remove the pull request screenshots

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Say in AGENTS.md and CONTRIBUTING.md that in-app help links to the docs site

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* Fixes for 2026.9.2: OpenAI-compatible endpoints, and issues found in a live run (#146)

* Bump source-map-js in /web in the npm_and_yarn group across 1 directory (#135)

Bumps the npm_and_yarn group with 1 update in the /web directory: [source-map-js](https://github.com/7rulnik/source-map-js).


Updates `source-map-js` from 1.2.1 to 1.2.2
- [Release notes](https://github.com/7rulnik/source-map-js/releases)
- [Changelog](https://github.com/7rulnik/source-map-js/blob/main/CHANGELOG.md)
- [Commits](7rulnik/source-map-js@v1.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: source-map-js
  dependency-version: 1.2.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Honor OpenAI-compatible endpoints, and two Discover/name fixes

- Settings gains OPENAI_BASE_URL (AI > More). Test and Load models call
  it instead of api.openai.com, and as a catalog key it now reaches jobs
  started from the web UI, including when set on the container (#140).
- Discover counts a per-URL timeout toward the retry limit, so a page
  that always times out is set aside (#127).
- Shouted-name detection works in any script, not only A-Z (#127).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fixes from a live run against a 12k-recipe library

- Live name cleanup skips renames to a name another recipe has; Mealie
  rejects them ("Recipe already exists") whatever slug is sent, which
  failed the whole job (#127).
- Mealie backup wait defaults to 30 minutes (a 12k library took 14).
- The Library's missing-servings finding drops "Fill in": the yield job
  can't fill recipes with no servings or yield text at all.
- No flash of the sign-in form while the session check runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Show why a rename was skipped, count name-taken skips, relabel backup keep

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* Release 2026.9.2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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