-
Notifications
You must be signed in to change notification settings - Fork 662
[FIX] Resolve Prompt Studio default LLM profile and unblock deploy when LLMChallenge is off #2203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -184,7 +184,7 @@ | |
| raise PermissionError(error_msg) | ||
|
|
||
| @staticmethod | ||
| def validate_profile_manager_owner_access( | ||
|
Check failure on line 187 in backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py
|
||
| profile_manager: ProfileManager, | ||
| ) -> None: | ||
| """Helper method to validate the owner's access to the profile manager. | ||
|
|
@@ -696,7 +696,7 @@ | |
| ] | ||
|
|
||
| @staticmethod | ||
| def build_fetch_response_payload( | ||
|
Check failure on line 699 in backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py
|
||
| tool: CustomTool, | ||
| doc_path: str, | ||
| doc_name: str, | ||
|
|
@@ -721,6 +721,11 @@ | |
| profile_manager_id=profile_manager_id | ||
| ) | ||
|
|
||
| # A prompt need not carry its own profile FK - fall back to the project | ||
| # default, matching index_document and single-pass extraction. | ||
| if not profile_manager: | ||
| profile_manager = ProfileManager.get_default_llm_profile(tool) | ||
|
|
||
|
Comment on lines
+724
to
+728
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Propagate the selected fallback profile to callback handling. When this path resolves a project default, 🤖 Prompt for AI Agents |
||
| if not profile_manager: | ||
| raise DefaultProfileError() | ||
|
|
||
|
|
@@ -1812,6 +1817,11 @@ | |
| profile_manager_id=profile_manager_id | ||
| ) | ||
|
|
||
| # A prompt need not carry its own profile FK - fall back to the project | ||
| # default, matching index_document and single-pass extraction. | ||
| if not profile_manager: | ||
| profile_manager = ProfileManager.get_default_llm_profile(tool) | ||
|
|
||
| if not profile_manager: | ||
| raise DefaultProfileError() | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Keep the error message accurate for tool-level LLM failures.
DefaultProfileErroris also raised whenmonitor_llmorchallenge_llmis unset and the project default cannot be resolved, even when the prompt already has a valid profile. In that case, “attach an LLM profile to the prompt” does not fix the failure; use a context-specific message or make those fallbacks use the already-resolved profile.🤖 Prompt for AI Agents