Fix AI summary model/base-url config and thinking-block parsing - #26
Merged
Merged
Conversation
ai_summary.py read settings.ANTHROPIC_MODEL, which doesn't exist (the setting is ANTHROPIC_SUMMARY_MODEL), so model overrides from env/.env/ Helm values were silently ignored everywhere. Also wire ANTHROPIC_BASE_URL into the helm/compose chart (helm/simple already had it), document it in .env.example, add matching --anthropic-model/--anthropic-base-url flags to start-scd-reporting, and fix response parsing to skip ThinkingBlock content when extended thinking is enabled. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes configuration wiring and response parsing for the AI Summary feature so that model/base URL overrides are actually honored and “extended thinking” responses don’t break summary generation.
Changes:
- Read
settings.ANTHROPIC_SUMMARY_MODEL/settings.ANTHROPIC_BASE_URLand skip non-text content blocks (e.g.,ThinkingBlock) when assembling summaries. - Wire
ANTHROPIC_BASE_URLthrough thehelm/composechart and document it in.env.example. - Add
--anthropic-model/--anthropic-base-urlflags tostart-scd-reportingand export matching env vars.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/start-scd-reporting | Adds CLI flags and exports for Anthropic model/base URL to control AI Summary runtime config. |
| helm/compose/values.yaml | Introduces anthropic.baseUrl value for compose chart configuration. |
| helm/compose/templates/configmap.yaml | Exposes ANTHROPIC_BASE_URL via ConfigMap env var. |
| apps/reports/ai_summary.py | Uses the correct settings fields and parses only text blocks from the Anthropic response. |
| .env.example | Documents ANTHROPIC_BASE_URL usage for proxy routing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+230
to
+234
| # | ||
| # AI Settings | ||
| export ANTHROPIC_API_KEY="$ANTHROPIC_KEY" | ||
| export ANTHROPIC_BASE_URL="$ANTHROPIC_BASE_URL" | ||
| export ANTHROPIC_SUMMARY_MODEL="$ANTHROPIC_SUMMARY_MODEL" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ai_summary.pyreadsettings.ANTHROPIC_MODEL, which doesn't exist (the setting isANTHROPIC_SUMMARY_MODEL), so model overrides from env/.env/Helm values were silently ignored everywhereANTHROPIC_BASE_URLinto thehelm/composechart (helm/simplealready had it), document it in.env.example, and add matching--anthropic-model/--anthropic-base-urlflags tostart-scd-reportingThinkingBlockcontent when extended thinking is enabled by the model/proxyTest plan
generate()against realWorkItemdata viamanage.py shellwith the new API key/model/base-url — returns a proper summary instead of'ThinkingBlock' object has no attribute 'text'helm templateon bothhelm/composeandhelm/simplerendersANTHROPIC_BASE_URLcorrectlysettings.ANTHROPIC_SUMMARY_MODEL/ANTHROPIC_BASE_URLresolve from.env🤖 Generated with Claude Code