Skip to content

Commit 2410593

Browse files
authored
fix(github): support variant in github action and opencode github run (anomalyco#14431)
1 parent 1de1260 commit 2410593

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

github/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ inputs:
3030
description: "Comma-separated list of trigger phrases (case-insensitive). Defaults to '/opencode,/oc'"
3131
required: false
3232

33+
variant:
34+
description: "Model variant for provider-specific reasoning effort (e.g., high, max, minimal)"
35+
required: false
36+
3337
oidc_base_url:
3438
description: "Base URL for OIDC token exchange API. Only required when running a custom GitHub App install. Defaults to https://api.opencode.ai"
3539
required: false
@@ -71,4 +75,5 @@ runs:
7175
PROMPT: ${{ inputs.prompt }}
7276
USE_GITHUB_TOKEN: ${{ inputs.use_github_token }}
7377
MENTIONS: ${{ inputs.mentions }}
78+
VARIANT: ${{ inputs.variant }}
7479
OIDC_BASE_URL: ${{ inputs.oidc_base_url }}

packages/opencode/src/cli/cmd/github.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ export const GithubRunCommand = cmd({
450450
const isWorkflowDispatchEvent = context.eventName === "workflow_dispatch"
451451

452452
const { providerID, modelID } = normalizeModel()
453+
const variant = process.env["VARIANT"] || undefined
453454
const runId = normalizeRunId()
454455
const share = normalizeShare()
455456
const oidcBaseUrl = normalizeOidcBaseUrl()
@@ -912,6 +913,7 @@ export const GithubRunCommand = cmd({
912913
const result = await SessionPrompt.prompt({
913914
sessionID: session.id,
914915
messageID: Identifier.ascending("message"),
916+
variant,
915917
model: {
916918
providerID,
917919
modelID,
@@ -965,6 +967,7 @@ export const GithubRunCommand = cmd({
965967
const summary = await SessionPrompt.prompt({
966968
sessionID: session.id,
967969
messageID: Identifier.ascending("message"),
970+
variant,
968971
model: {
969972
providerID,
970973
modelID,

0 commit comments

Comments
 (0)