feat: add Celeris provider - #10714
Conversation
Celeris serves diffusion-based language models over an OpenAI-compatible chat-completions API at https://inference.celeris.ai/<model>/v1. celeris-1 has an 8192-token context shared between prompt and completion, and the base URL pins the model in its path, so skip_canonical_filtering is set and the model list is static. Known limitation: the API rejects any max_tokens that is not 1 or a positive multiple of 256. The declarative format has no request-transform hook, so a user-configured non-aligned max_tokens will 400. The default path is safe via the canonical catalog's 256-aligned limit.output. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd9491b43c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -0,0 +1,20 @@ | |||
| { | |||
| "name": "celeris", | |||
There was a problem hiding this comment.
Enforce Celeris max-token granularity
When GOOSE_MAX_TOKENS is set to a positive value that is not 1 or a multiple of 256 (including documented examples such as 16000), materialize_model_config_inner accepts it and the OpenAI formatter forwards it unchanged, so every Celeris request fails with HTTP 400. Normalize or reject incompatible values for this provider before exposing it as supported.
Useful? React with 👍 / 👎.
| expose_declarative_providers!( | ||
| alibaba, | ||
| atomic_chat, | ||
| celeris, |
There was a problem hiding this comment.
Add the required provider feature self-test
This line exposes a new bundled provider, but the commit leaves goose-self-test.yaml unchanged, so the repository-required feature-level validation does not cover the integration or its unusual request constraints. Add an appropriate Celeris validation scenario to the self-test recipe before exposing the provider.
AGENTS.md reference: AGENTS.md:L71-L71
Useful? React with 👍 / 👎.
The previous copy framed celeris-1 as a speciality model for short structured responses. It is a general-purpose model, so describe what it is and how it differs from autoregressive models rather than narrowing it to one use case. No functional change; technical constraints are documented exactly as before. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dda79305aa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "api_key_env": "CELERIS_API_KEY", | ||
| "base_url": "https://inference.celeris.ai/celeris-1/v1", | ||
| "models": [ | ||
| { "name": "celeris-1", "context_limit": 8192 } |
There was a problem hiding this comment.
Reserve Celeris output tokens before advertising 8K context
With the default auto-compaction threshold (0.8) and no GOOSE_MAX_TOKENS/canonical limit, Goose sends no max_tokens, so a session around 6.2K–6.5K prompt tokens is considered under the 8,192-token limit and skips compaction. The Celeris API reference says omitted max_tokens defaults to 2,048 and prompt tokens plus max_tokens must be at most 8,192, so those requests will 400 before Goose compacts; either advertise an effective input budget here or add provider-specific handling that reserves/sizes the output budget.
Useful? React with 👍 / 👎.
|
Can you clarify the known limitation around why max tokens needs to be a multiple of 256 and why the context limit is so low compared to what is advertised on https://docs.celeris.ai/api-reference#request-body-1? |
* main: (32 commits) fix: keep turn-context in place for OpenAI Responses-stack models so prompt caching works (#10993) fix(developer): byte-bound the shell truncation preview (#10992) fix(openrouter): stop silently ignoring thinking effort off (#10991) fix: dispatch edited queued messages (#10933) fix: contain recipe template paths (#10930) fix: make shell approval titles faithful (#10986) fix: block MCP app form submissions (#10985) fix: migrate desktop routing to React Router 8.3.0 (#10971) fix: sanitize Bedrock tool errors (#10934) fix implicit OAuth during model discovery (#10929) fix: update React Router to 7.18.2 (#10967) test: early-exit code-exec smoke tests once tool invocation is observed (#10954) fix: keep ACP session naming out of live conversations (#10963) Bind MCP apps to trusted ownership metadata (#10747) tests: add recursion_limit attribute to remaining ACP test files (#10559) Sanitize Unicode tags in MCP resources (#10746) fix(oauth): preserve RFC 9207 iss from MCP OAuth callback (#10678) feat(installer): detect Termux and select musl portable build (#10568) feat: add Celeris provider (#10714) fix: shell ACP providers on desktop (#10907) ...
* main: (101 commits) fix: keep turn-context in place for OpenAI Responses-stack models so prompt caching works (#10993) fix(developer): byte-bound the shell truncation preview (#10992) fix(openrouter): stop silently ignoring thinking effort off (#10991) fix: dispatch edited queued messages (#10933) fix: contain recipe template paths (#10930) fix: make shell approval titles faithful (#10986) fix: block MCP app form submissions (#10985) fix: migrate desktop routing to React Router 8.3.0 (#10971) fix: sanitize Bedrock tool errors (#10934) fix implicit OAuth during model discovery (#10929) fix: update React Router to 7.18.2 (#10967) test: early-exit code-exec smoke tests once tool invocation is observed (#10954) fix: keep ACP session naming out of live conversations (#10963) Bind MCP apps to trusted ownership metadata (#10747) tests: add recursion_limit attribute to remaining ACP test files (#10559) Sanitize Unicode tags in MCP resources (#10746) fix(oauth): preserve RFC 9207 iss from MCP OAuth callback (#10678) feat(installer): detect Termux and select musl portable build (#10568) feat: add Celeris provider (#10714) fix: shell ACP providers on desktop (#10907) ...
Summary
Adds Celeris as a declarative OpenAI-compatible provider — one JSON definition plus a line in the
expose_declarative_providers!list, following the same shape as the Fireworks, EmpirioLabs and OrcaRouter additions.Celeris serves diffusion-based language models over an OpenAI-compatible chat-completions API, aimed at low-latency short responses.
celeris-1is the only model served today.Disclosure: I work with Celeris — this is a vendor-submitted integration and I'll maintain it. Flagging that up front so you can weight the review accordingly. The definition was drafted with AI assistance and then verified by hand against the live API; I've read the contributing guide and kept this to the smallest change that does the job.
A known limitation you should weigh before merging
I'd rather you hear this from me than find it later.
The Celeris API rejects any
max_tokensthat isn't1or a positive multiple of 256:The declarative provider format has no hook for transforming request parameters, so this constraint can't be enforced from the JSON definition. What that means in practice:
max_tokensconfigured,ModelConfig::with_canonical_limitsfills it from the canonical catalog'slimit.output. I've submitted the models.dev entry withlimit.output = 4096— 256-aligned — precisely so this path stays valid (anomalyco/models.dev#3757). Before that entry lands,max_tokensstaysNoneand isn't sent at all, which is also fine.max_tokensthat isn't 256-aligned, every request to Celeris returns a 400, and nothing in the current architecture catches it.The clean general fix is a
max_tokens_multiplefield on the declarative definition applied insanitize_request_for_compat, which would serve any provider with a quantized limit rather than just this one. That touches shared code, so I didn't want to bundle it into a first contribution unasked. Happy to open an issue or send it as a follow-up if you think it's worth having — equally happy for you to tell me the sharp edge is acceptable for now.Other constraints worth knowing
context_limitis 8192 and it's shared between prompt and completion — not 8K in plus 8K out. A 7,169-token prompt withmax_tokens: 1024returns a 400. That makes this a poor fit as a primary coding model and a reasonable one for short, fast turns.response_format— no JSON mode or JSON-schema output. Structured output has to route through tool calling, which does work.skip_canonical_filteringis set because Celeris serves exactly one model per base URL and/modelsrequires auth.base_urlis pinned tohttps://inference.celeris.ai/celeris-1/v1because the model id is part of the URL path.Testing
cargo check -p goose-providers— clean.cargo test -p goose-providers --lib declarative— 10 passed, includingall_bundled_providers_are_validandexpose_declarative_providers_enumerates_all_bundled_json_files.Related Issues
None — happy to file one first if you'd prefer that order.