Skip to content

fix: correct /v1/images/edits path + add Ollama /api/embed alias#242

Merged
jpr5 merged 3 commits into
mainfrom
fix/images-edits-route
May 27, 2026
Merged

fix: correct /v1/images/edits path + add Ollama /api/embed alias#242
jpr5 merged 3 commits into
mainfrom
fix/images-edits-route

Conversation

@jpr5
Copy link
Copy Markdown
Contributor

@jpr5 jpr5 commented May 27, 2026

Summary

Two route-registration bug fixes shipped as patch v1.27.3.

  • /v1/images/edits — corrects the OpenAI image-edit endpoint path. v1.25.0 registered it at /v1/images/edit (singular), but OpenAI's actual endpoint is /v1/images/edits (plural). Real OpenAI SDKs were hitting aimock with 404. Closes Support for /images/edit #221.
  • /api/embed — adds the current Ollama embeddings endpoint as a co-registered alias for the legacy /api/embeddings. Both paths now dispatch to the same handler. Per https://github.com/ollama/ollama/blob/main/docs/api.md, /api/embed is the current documented path; /api/embeddings is retained for back-compat. Modern Ollama SDKs targeting /api/embed no longer 404.

Also updates README/DRIFT.md to reflect both corrections, and bumps v1.27.2 → v1.27.3 across package.json, .claude-plugin/plugin.json, .claude-plugin/marketplace.json, and CHANGELOG.md.

Test plan

  • Red-green: new test asserts /v1/images/edits returns 200 and /v1/images/edit returns 404
  • Red-green: new test asserts /api/embed returns the same 1536-dim Ollama embedding shape as /api/embeddings
  • Full suite: 3206 tests pass, 0 failures
  • Lint, format, typecheck, build all clean
  • CR loop: 7-agent unbiased review, zero functional findings; Procedure 3 audit clean

jpr5 added 2 commits May 27, 2026 11:14
The OpenAI image edit endpoint is /v1/images/edits (plural), but PR #222
(shipped in v1.25.0) registered the route as /v1/images/edit (singular).
Real OpenAI SDK clients hit a 404 against aimock.

Updates the canonical path constant in server.ts, the OpenAI-compat suffix
list, the in-source comments and default fallbacks in images.ts, the test
suite (renamed image-edit.test.ts -> image-edits.test.ts and hits the new
path; one assertion confirms the legacy singular path is now 404), the
DRIFT.md route table, the competitive-matrix keywords, and the README
multimedia summary.

Closes #221
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 27, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@copilotkit/aimock@242

commit: 0a63e64

Bumps package.json from 1.27.2 to 1.27.3 (patch), updates the
.claude-plugin manifests, and records the #221 fix plus the Ollama
/api/embed alias under [1.27.3] in CHANGELOG.md.
@jpr5 jpr5 force-pushed the fix/images-edits-route branch from b9952fe to 0a63e64 Compare May 27, 2026 18:46
@jpr5 jpr5 merged commit 46a996c into main May 27, 2026
23 checks passed
@jpr5 jpr5 deleted the fix/images-edits-route branch May 27, 2026 19:00
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.

Support for /images/edit

1 participant