Repository navigation
feat: backend omlx - #167
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (3)
🚧 Files skipped from review as they are similar to previous changes (3)
WalkthroughAdds oMLX as a supported backend: provider constants and profile, routing and discovery registration, OpenAI-compatible model parsing updates with tests, and extensive API and integration documentation. ChangesoMLX Backend Integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@sg-shag / @bongiozzo let me know if this profile works for you natively. |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/content/api-reference/omlx.md`:
- Around line 170-180: The fenced streaming example block is missing a language
tag which causes markdown lint errors; update the fenced code block that starts
with the streaming lines like `data: {"id":"chatcmpl-abc123",...}` and ends with
`data: [DONE]` to include a language identifier (e.g., add ```text before the
first data line and keep the closing ```), so the block becomes a labeled "text"
code fence for proper linting and rendering.
In `@docs/content/index.md`:
- Line 104: The backend-type examples list for the header `X-Olla-Backend-Type`
is missing the `docker-model-runner` provider; update the table cell value that
currently lists
"(ollama/openai/openai-compatible/lm-studio/llamacpp/vllm/sglang/lemonade/lmdeploy/omlx)"
to include `docker-model-runner` among the comma-separated backend types so the
supported providers are consistent across docs.
In `@docs/content/integrations/api-translation/anthropic.md`:
- Line 62: The docs list oMLX as compatible in the integrations text but the
"Passthrough-Compatible Backends" table omits it; update the
Passthrough-Compatible Backends table to include oMLX so the table matches the
inline list (ensure the table row/entry for oMLX reflects its passthrough
eligibility given native Anthropic support and follows the same naming/format
used for other backends in that table).
In `@docs/content/integrations/backend/omlx.md`:
- Around line 205-207: The documentation line for the endpoint
<code>/v1/messages/count_tokens</code> incorrectly claims a “forwarded path”;
update the wording to reflect that oMLX does not forward token-count requests
(see the profile flag <code>token_count: false</code>)—e.g., replace “Anthropic
token count (forwarded path; see note above)” with a phrase that states it is
not forwarded / not supported for passthrough (and reference the profile
setting) so the docs no longer imply passthrough behavior.
In `@internal/adapter/registry/profile/parsers.go`:
- Around line 232-246: The hasDetails check currently considers model.OwnedBy
but no value is set from it, causing empty domain.ModelDetails; update the
construction of details in the parsing path (the hasDetails branch) to map
model.OwnedBy into details.Publisher (or remove OwnedBy from the hasDetails
condition). Specifically, when model.OwnedBy != nil set details.Publisher =
model.OwnedBy (converting types if necessary) alongside the existing assignments
for ModifiedAt and MaxContextLength so that domain.ModelDetails actually
contains the publisher information.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 69695952-f318-4419-a755-f04081b75954
📒 Files selected for processing (27)
config/profiles/omlx.yamldocs/content/api-reference/omlx.mddocs/content/api-reference/overview.mddocs/content/concepts/profile-system.mddocs/content/configuration/reference.mddocs/content/faq.mddocs/content/getting-started/quickstart.mddocs/content/index.mddocs/content/integrations/api-translation/anthropic.mddocs/content/integrations/backend/omlx.mddocs/content/integrations/frontend/claude-code.mddocs/content/integrations/overview.mddocs/content/usage.mddocs/mkdocs.ymlinternal/adapter/discovery/http_client.gointernal/adapter/registry/profile/openai_compatible.gointernal/adapter/registry/profile/openai_compatible_parser_test.gointernal/adapter/registry/profile/parsers.gointernal/app/handlers/handler_common.gointernal/app/handlers/handler_common_test.gointernal/app/handlers/handler_provider_common.gointernal/app/handlers/handler_provider_compatibility_test.gointernal/app/handlers/server_routes.gointernal/core/constants/providers.gointernal/core/constants/providers_test.gointernal/core/domain/profile.gointernal/version/version.go
| <td><code>/v1/messages/count_tokens</code></td> | ||
| <td>Anthropic token count (forwarded path; see note above)</td> | ||
| </tr> |
There was a problem hiding this comment.
Fix contradiction on /v1/messages/count_tokens forwarding behaviour.
This row says “forwarded path”, but earlier docs and profile config state Olla does not forward token-count requests for oMLX yet (token_count: false). Please reword to avoid implying passthrough support.
Suggested fix
- <td>Anthropic token count (forwarded path; see note above)</td>
+ <td>Anthropic token count endpoint exists on oMLX, but Olla currently serves local estimation (not forwarded)</td>🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/content/integrations/backend/omlx.md` around lines 205 - 207, The
documentation line for the endpoint <code>/v1/messages/count_tokens</code>
incorrectly claims a “forwarded path”; update the wording to reflect that oMLX
does not forward token-count requests (see the profile flag <code>token_count:
false</code>)—e.g., replace “Anthropic token count (forwarded path; see note
above)” with a phrase that states it is not forwarded / not supported for
passthrough (and reference the profile setting) so the docs no longer imply
passthrough behavior.
It works! Thank you |
Adds native support for oMLX backend.
Summary by CodeRabbit
New Features
Documentation