@andershaf/testopencode
v0.1.1
Published
OpenCode provider for CDF project AI chat (atlascode-style request sanitize + response normalize)
Downloads
231
Readme
@andershaf/testopencode
OpenCode custom provider for CDF project AI (/api/v1/projects/{project}/ai/chat/completions).
- Strips fields CDF rejects (
max_tokens,tool_choice,stream_options, toolparameters.$schema, …). - Normalizes CDF camelCase responses to OpenAI-style snake_case for the AI SDK.
Derived from cognitedata/atlascode PR #1.
OpenCode opencode.json
{
"provider": {
"cdf": {
"name": "CDF",
"npm": "@andershaf/testopencode",
"models": {
"azure/gpt-5.1": {
"name": "GPT-5.1",
"id": "azure/gpt-5.1",
"tool_call": true
}
},
"options": {
"cluster": "api",
"project": "your-project",
"token": "{env:CDF_TOKEN}",
"headers": {
"cdf-version": "20230101-alpha"
}
}
}
},
"model": "cdf/azure/gpt-5.1"
}Publish
cd packages/testopencode
npm install
npm run build
npm publish --access publicUse an npm account with access to the @andershaf scope.
Develop
npm run build