Claude/check 011 cv33gddu b qs l4 quyw86z c#19
Merged
anamsarfraz merged 4 commits intoclaude/still-disco-011CUzRCZPvjPRrbz1VNy2CYfrom Nov 12, 2025
Merged
Conversation
…RCZPvjPRrbz1VNy2CY Claude/still disco 011 c uz rcz pvj p rrbz1 v ny2 cy
PROBLEM: gpt-5 (Azure deployment) was failing silently - not generating any responses. gpt-4.1-mini worked but gpt-5 didn't. ROOT CAUSE: Recent merge changed 'max_tokens' to 'max_completion_tokens' in: - _call_openai() line 295 - _call_azure_openai_custom() line 356 The 'max_completion_tokens' parameter is only supported in: - OpenAI API 2024-10-01-preview and later - Some Azure deployments reject it even with newer API versions Azure gpt-5 (API version 2025-01-01-preview) was rejecting requests with this parameter, causing silent failures. SOLUTION: Changed back to 'max_tokens' in both methods for broader compatibility: - Works with all OpenAI API versions - Works with all Azure OpenAI deployments - Backward compatible This fixes gpt-5 so it can now generate responses. Next issue to address: Line coverage still 0.00% (LLM not including line numbers despite explicit prompting). Will test if gpt-5 follows instructions better than mini.
PROBLEM: Got BadRequestError from OpenAI SDK: "Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead." ROOT CAUSE: My previous commit (c2205f9) changed max_completion_tokens → max_tokens, but that was wrong. Newer OpenAI API versions (2024-10-01-preview+) REQUIRE max_completion_tokens, not max_tokens. The config uses: - gpt-4.1-mini: api_version "2025-01-01-preview" → needs max_completion_tokens - gpt-5: api_version "2025-01-01-preview" → needs max_completion_tokens - gpt-4.1: api_version "2024-12-01-preview" → needs max_completion_tokens SOLUTION: Changed back to max_completion_tokens in: - _call_openai() line 296 - _call_azure_openai_custom() line 358 This is the correct parameter for: - OpenAI API 2024-10-01-preview and later - Azure OpenAI API 2024-10-01-preview and later Note: Older API versions use max_tokens, but all our deployments use 2024-12+ versions. Apologies for the confusion - the original merge was correct, my "fix" broke it.
…in synthesis ROOT CAUSE: synthesis.py was calling tiered_llm.synthesize_answer() which created its own generic prompt without line number requirements. The detailed prompt built by _build_synthesis_prompt() with explicit line number requirements was completely ignored, causing 0.00% line coverage in validation. FIX: Changed synthesis.py to call tiered_llm.generate() directly with the detailed prompt instead of calling synthesize_answer(). This ensures the prompt with: - MUST include line number references - Required format examples - Explicit requirements for citations Now reaches the LLM, which should result in narratives with line numbers and validation passing (line coverage > 0%). Lines changed: 107-125 in cf/agents/pipelines/synthesis.py
anamsarfraz
added a commit
that referenced
this pull request
Jan 31, 2026
…QsL4Quyw86zC Claude/check 011 cv33gddu b qs l4 quyw86z c
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.
Pull Request
Description
Brief description of the changes in this PR.
Type of Change
How Has This Been Tested?
Checklist
Related Issues
Closes #(issue number)
Screenshots (if applicable)
Add screenshots to help explain your changes.
Additional Notes
Any additional information that reviewers should know.