AI Configuration
Options of the AI rewrites of the provider release notes and of the social posts - provider, model, credentials, language, fallback, prompts and targets.
Every AI rewrite is off by default: turn on the targets you want with providerRelease and social. Setup of the providers, dry run and examples: AI-Enhanced Changelogs.
import { defineConfig } from 'relizy'
export default defineConfig({
ai: {
language: 'en',
providerRelease: { enabled: true },
social: {
twitter: { enabled: true },
slack: { enabled: true },
},
},
})provider
Type:
'claude-code' | 'ai-sdk'Default:
'claude-code'claude-code: Claude, through@yoloship/claude-sdkand theclaudeCLI.ai-sdk: any model of the Vercel AI SDK (OpenAI, Google, Mistral, Anthropic...), throughaiand the package of the provider.
providers
Options of each provider, by name.
claude-code
apiKey
- Type:
string - Default:
tokens.ai['claude-code'].apiKey, read fromRELIZY_ANTHROPIC_API_KEYorANTHROPIC_API_KEY
Anthropic API key.
oauthToken
- Type:
string - Default:
tokens.ai['claude-code'].oauthToken, read fromRELIZY_CLAUDE_CODE_OAUTH_TOKENorCLAUDE_CODE_OAUTH_TOKEN
Claude Code OAuth token.
The API key and the OAuth token are resolved each on its own (this option, else tokens.ai, else the environment), and both are given to the Claude SDK. The safety check fails when neither is set. See Tokens.
model
- Type:
string - Default:
'haiku'
Alias (haiku, sonnet, opus) or versioned id of the Claude model.
ai-sdk
model
- Type:
LanguageModel - Required with
provider: 'ai-sdk'
A model of a provider package, or a model id of the Vercel AI Gateway ('openai/gpt-5-mini', with AI_GATEWAY_API_KEY). Relizy does not read the credentials of this provider: the provider package reads its own environment variable (OPENAI_API_KEY for @ai-sdk/openai), or the options of an instance you create:
import { createOpenAI } from '@ai-sdk/openai'
import { defineConfig } from 'relizy'
const openai = createOpenAI({ apiKey: process.env.MY_OPENAI_API_KEY })
export default defineConfig({
ai: {
provider: 'ai-sdk',
providers: {
'ai-sdk': { model: openai('gpt-5-mini') },
},
},
})reasoning
- Type: the
reasoningoption ofgenerateText()ofai('provider-default','none','low','medium','high'...) - Default: not sent, the default of the provider applies
Reasoning effort, for the models that support it. A lower effort makes the rewrite faster and cheaper.
language
- Type:
string - Default:
'en'
Language of the output, as an ISO 639-1 code (fr) or an English name (French). Only the prose is translated: the code, the identifiers, the package names and the section headings stay as they are. To translate the headings, set the title of the types.
fallback
- Type:
'raw' | 'fail' - Default:
'raw'
When a call fails (network, quota, credentials):
raw: warn, and keep the text without AI. With several versions in a post, a version missing from the output also keeps its raw changelog.fail: throw.relizy provider-releaseandrelizy socialfail with code1; inrelizy release, the step is marked as failed and the release goes on, as for any failed provider release or post.
onlyStable
- Type:
boolean - Default:
true
Rewrite only the stable versions: a prerelease (2.0.0-beta.0, a canary) keeps its raw changelog, without an AI call. In a post announcing several versions, only its stable versions are rewritten. A prerelease bump (--prerelease, --prepatch, --preminor, --premajor) does not check the AI provider either (credentials, claude CLI): its AI never runs. The onlyStable of a target overrides it, e.g. to rewrite the notes of the prereleases but not their posts:
export default defineConfig({
ai: {
onlyStable: true,
providerRelease: { enabled: true, onlyStable: false },
},
})extraGuidelines
- Type:
string | { global?: string, providerRelease?: string, twitter?: string, slack?: string, teams?: string }
Directives appended to the built-in prompts. A string applies to every target. With an object, global applies to every target, then providerRelease, twitter, slack or teams to its target:
export default defineConfig({
ai: {
extraGuidelines: {
global: 'Never mention the internal codename "Phoenix".',
slack: 'Mention the team owning each change when the scope tells it.',
twitter: 'Add the #opensource hashtag.',
},
},
})systemPromptOverrides
- Type:
{ providerRelease?: string, twitter?: string, slack?: string, teams?: string }
Replaces the whole built-in prompt of a target: the base prompt, the prompt of the platform and the extraGuidelines are not sent for it. Prefer extraGuidelines to add rules.
Placeholders:
{{language}}:language;{{maxLength}}: the length budget of the post. On Twitter, what the template leaves withinsocial.twitter.postMaxLength. On Slack,social.slack.postMaxLength, else 2500 insummaryformat; infullformat withoutpostMaxLength, there is no budget and the placeholder is left as is.
The model receives the changelog in a <changelog> tag, after a <release-context> tag (project, version, previous version and kind of release, when known). When a post announces several versions, each changelog is sent in a <release id="..." title="..."> element, and the instructions to answer one <release id="..."> element per version are always appended, overridden prompt or not.
export default defineConfig({
ai: {
systemPromptOverrides: {
twitter: 'Write one tweet of at most {{maxLength}} characters, in {{language}}, without hashtag.',
},
},
})providerRelease
enabled
- Type:
boolean - Default:
false
Rewrite the body of the GitHub and GitLab releases: the changes only, the compare link and the contributors are kept as generated. One call per provider release (one per package of an independent release).
onlyStable
- Type:
boolean - Default:
ai.onlyStable
Leave the notes of the prereleases without AI. Overrides ai.onlyStable for the provider releases.
A version group can override enabled and onlyStable with its own ai.providerRelease, e.g. to create the releases of an independent group without AI:
export default defineConfig({
ai: { providerRelease: { enabled: true } },
monorepo: {
groups: [
{ name: 'main', versionMode: 'selective', packages: ['packages/*'] },
{ name: 'tooling', versionMode: 'independent', packages: ['tooling/*'], ai: { providerRelease: { enabled: false } } },
],
},
})social
twitter
- Type:
{ enabled?: boolean, onlyStable?: boolean } - Default:
{ enabled: false }
Rewrite the changelog of the tweet as plain text, within its length budget. Only when social.twitter.enabled is also true.
slack
- Type:
{ enabled?: boolean, onlyStable?: boolean } - Default:
{ enabled: false }
Rewrite the changelog of the Slack message. The model writes standard markdown (never Slack mrkdwn), that Relizy converts with the changelog of the message: 3 to 8 bullets in summary format, every change in full format. Only when social.slack.enabled is also true.
teams
- Type:
{ enabled?: boolean, onlyStable?: boolean } - Default:
{ enabled: false }
Rewrite the changelog of the Teams cards as 3 to 8 short bullets (bold, italic and links only, as a card renders them). Only when social.teams.enabled is also true and social.teams.changelog is 'summary'.
One call per enabled platform and per release, even when the post announces several versions. The onlyStable of a platform overrides ai.onlyStable for its posts.
CLI
--ai and --no-ai of relizy release, relizy provider-release and relizy social turn every target on or off for the run. A dry run never calls the AI, unless --ai-preview: see Dry Run.