Skip to content

Fixed Indentation#786

Open
dunchuan wants to merge 1 commit into
srbhr:mainfrom
dunchuan:main
Open

Fixed Indentation#786
dunchuan wants to merge 1 commit into
srbhr:mainfrom
dunchuan:main

Conversation

@dunchuan

@dunchuan dunchuan commented May 4, 2026

Copy link
Copy Markdown

Pull Request Title

Related Issue

Description

copilot:summary

Type

  • Bug Fix
  • Feature Enhancement
  • Documentation Update
  • Code Refactoring
  • Other (please specify):

Proposed Changes

Screenshots / Code Snippets (if applicable)

How to Test

Checklist

  • The code compiles successfully without any errors or warnings
  • The changes have been tested and verified
  • The documentation has been updated (if applicable)
  • The changes follow the project's coding guidelines and best practices
  • The commit messages are descriptive and follow the project's guidelines
  • All tests (if applicable) pass successfully
  • This pull request has been linked to the related issue (if applicable)

Additional Information

copilot:walkthrough


Summary by cubic

Fixes indentation in apps/backend/app/llm.py so _appears_truncated has a valid body, preventing a SyntaxError and restoring backend startup.

Written for commit d2f463a. Summary will update on new commits.

@dunchuan dunchuan changed the title fixed indentation Fixed Indentation May 4, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/backend/app/llm.py">

<violation number="1" location="apps/backend/app/llm.py:735">
P1: `FALLBACK_MAX_TOKENS` is now local to the stray `_appears_truncated` function, so `get_safe_max_tokens()` will hit `NameError` on the fallback path.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread apps/backend/app/llm.py

def _appears_truncated(data: dict, schema_type: str = "resume") -> bool:
FALLBACK_MAX_TOKENS = 4096
FALLBACK_MAX_TOKENS = 4096

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: FALLBACK_MAX_TOKENS is now local to the stray _appears_truncated function, so get_safe_max_tokens() will hit NameError on the fallback path.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/backend/app/llm.py, line 735:

<comment>`FALLBACK_MAX_TOKENS` is now local to the stray `_appears_truncated` function, so `get_safe_max_tokens()` will hit `NameError` on the fallback path.</comment>

<file context>
@@ -732,7 +732,7 @@ def _supports_json_mode(model_name: str) -> bool:
 
 def _appears_truncated(data: dict, schema_type: str = "resume") -> bool:
-FALLBACK_MAX_TOKENS = 4096
+    FALLBACK_MAX_TOKENS = 4096
 
 def get_safe_max_tokens(model_name: str, requested: int = DEFAULT_JSON_MAX_TOKENS) -> int:
</file context>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant