Adopt @ai-sdk/openai-compatible in microservice-accessability to use dotCMS as a model provider
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Description
Use a dotCMS instance as the model provider for the accessibility agent, via @ai-sdk/openai-compatible.
import { createOpenAICompatible } from '@ai-sdk/openai-compatible';
const dotcms = createOpenAICompatible({
name: 'dotcms',
baseURL: `${DOTCMS_HOST}/api/inference/v1`,
apiKey: DOTCMS_API_TOKEN,
});
model: dotcms('claude-sonnet-4-6')
Depends on #37431, which adds the /api/inference/v1 endpoints.
Where the code lands. dotCMS/microservice-accessability. Provider selection is already isolated in src/agents/runtime/model.ts behind an AgentProvider union and a PROVIDER_DEFAULT_MODEL record, so this is a new case plus config validation in src/config.ts. Tracked here because it is gated on #37431.
Constraints to build against, verified against a running instance. Chat, streaming, tool calling, stream_options.include_usage, embeddings and image generation all work.
baseURLmust end in/api/inference/v1. The package appends/chat/completions,/embeddingsand/images/generations; a base URL missing/v1returns a 404 that reads like a server fault.- Vision is unsupported. A plain string and an array of text parts are both accepted; any non-text part returns a 400 naming the part type.
frequency_penalty,presence_penalty,seedanduserare accepted and ignored. Onlytemperature,max_tokens,top_pandstopreach a provider, soseedwill not give reproducible output.
Acceptance Criteria
-
dotcmsadded to theAgentProviderunion insrc/agents/runtime/model.ts, backed bycreateOpenAICompatible -
PROVIDER_DEFAULT_MODELgains a dotCMS default - Config validation in
src/config.tsfor the host and API token, with the base URL either required in full or derived, so a missing/v1cannot reach a request - The API token is sent as
Authorization: Bearerand is never logged - dotCMS error responses map to AI SDK error types where the package's defaults are not already correct
- Existing agent tests still green with the new provider case
- The agent completes a multi-step tool-calling run (
src/agents/runtime/model-call.ts,stepCountIs(24)) against a dotCMS instance using only base URL + token - Setup documented: base URL with
/v1, token asapiKey, unsupported vision, ignored sampling parameters
Priority
Medium — blocked on #37431 landing first.
Additional Context
- Server-side counterpart: #37431 (
/api/inference/v1endpoints) - Implementation repo: https://github.com/dotCMS/microservice-accessability
@ai-sdk/openai-compatibledocs: https://ai-sdk.dev/providers/openai-compatible-providers
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Work in dotCMS/microservice-accessability, starting with src/agents/runtime/model.ts and src/config.ts; review the existing AgentProvider and PROVIDER_DEFAULT_MODEL patterns, then inspect src/agents/runtime/model-call.ts for the stepCountIs(24) run. Validate the provider against a dotCMS instance after #37431 lands, run the existing agent tests, and document the /v1 base URL, token, unsupported vision, and ignored sampling parameters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100