From 6aa526b06a61bb0da5ae13439278e352ae488935 Mon Sep 17 00:00:00 2001 From: Andrey Devyatkin Date: Sat, 4 Jul 2026 08:33:51 +0100 Subject: [PATCH 1/2] Allow colons in model IDs (versioned IDs and inference profiles) Bedrock model IDs can carry a version suffix (e.g. anthropic.claude-3-5-sonnet-20241022-v2:0), which the model/subagent_model validation regexes rejected. Relax both to accept ':' and note in the input description that inference profile IDs work too. Upstreamed from the vendored copy in sirob-tech/.github. The zai.glm-5 default stays unchanged. Co-Authored-By: Claude Fable 5 --- .github/workflows/ai-code-review.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ai-code-review.yml b/.github/workflows/ai-code-review.yml index bbb28d5..4a290eb 100644 --- a/.github/workflows/ai-code-review.yml +++ b/.github/workflows/ai-code-review.yml @@ -45,7 +45,7 @@ on: type: string default: "us-east-1" model: - description: "Bedrock model ID for the orchestrator and review subagents (OpenCode amazon-bedrock provider)" + description: "Bedrock model or inference profile ID for the orchestrator and review subagents (OpenCode amazon-bedrock provider)" required: false type: string default: "zai.glm-5" @@ -268,7 +268,7 @@ jobs: # The config file comes from the PR branch: sanitize every value # that reaches prompts or CLI flags to prevent injection. raw_model = str(cfg.get("model") or model) - if re.fullmatch(r"[A-Za-z0-9._-]+", raw_model): + if re.fullmatch(r"[A-Za-z0-9._:-]+", raw_model): model = raw_model else: warn(f"Invalid model {raw_model!r}, using default {model!r}") @@ -855,7 +855,7 @@ jobs: # Defense in depth: the value lands in agent frontmatter via envsubst # below. Callers are org-controlled, but validate anyway # (same regex the repo-config sanitizer applies to `model`). - if ! [[ "${SUBAGENT_MODEL}" =~ ^[A-Za-z0-9._-]+$ ]]; then + if ! [[ "${SUBAGENT_MODEL}" =~ ^[A-Za-z0-9._:-]+$ ]]; then echo "::error::Invalid subagent_model '${SUBAGENT_MODEL}'" exit 1 fi From 52b942cb9ca609e062e9fe4d3e2aa54564065118 Mon Sep 17 00:00:00 2001 From: Andrey Devyatkin Date: Sat, 4 Jul 2026 08:39:16 +0100 Subject: [PATCH 2/2] Clarify which inference profile formats the model input supports Scope the description to cross-region inference profile IDs; ARN-style application inference profiles stay outside the sanitizer's charset. Co-Authored-By: Claude Fable 5 --- .github/workflows/ai-code-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ai-code-review.yml b/.github/workflows/ai-code-review.yml index 4a290eb..58617d3 100644 --- a/.github/workflows/ai-code-review.yml +++ b/.github/workflows/ai-code-review.yml @@ -45,7 +45,7 @@ on: type: string default: "us-east-1" model: - description: "Bedrock model or inference profile ID for the orchestrator and review subagents (OpenCode amazon-bedrock provider)" + description: "Bedrock model ID or cross-region inference profile ID (e.g. us.anthropic.claude-opus-4-8) for the orchestrator and review subagents (OpenCode amazon-bedrock provider). ARN-style application inference profiles are not supported." required: false type: string default: "zai.glm-5"