Harden assistant activation and add integration coverage#9792
Draft
Saby-Bishops wants to merge 1 commit intomasterfrom
Draft
Harden assistant activation and add integration coverage#9792Saby-Bishops wants to merge 1 commit intomasterfrom
Saby-Bishops wants to merge 1 commit intomasterfrom
Conversation
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.
Motivation
assistantflag and provider compatibility before calling OpenAI assistant endpoints.Description
validateAssistantCompatibilitythat rejects assistant mode unlessassistant.enabledis true and the provider isopenai, and wire it intoaiChatStream/aiChatNonStream(modifiedchatapi/src/utils/chat-helpers.utils.ts).normalizeAssistantError, wrapping assistant calls in try/catch, implementing terminal run status handling, retry limit and timeout inwaitForRunCompletion, and normalizing streaming errors (modifiedchatapi/src/utils/chat-assistant.utils.ts).assistant.enabledto provider config and typing (chatapi/src/config/ai-providers.config.ts,chatapi/src/models/chat.model.ts).test:integration(newchatapi/src/tests/assistant.integration.test.tsandchatapi/package.json).assistantEnabledform control and UI slide toggle, includeassistant.enabledin saved configuration and defaults, and only setdata.assistantfor chat submissions when the toggle is on and provider is OpenAI (modifiedsrc/app/manager-dashboard/manager-aiservices.component.ts,src/app/manager-dashboard/manager-aiservices.component.html,src/app/configuration/configuration.component.ts, andsrc/app/chat/chat-window/chat-window.component.ts).assistant.enabledflag (src/app/manager-dashboard/manager-aiservices.component.spec.ts).Testing
npm --prefix chatapi run buildto compile the chatapi TypeScript bundle and it succeeded.npm --prefix chatapi run lint(ESLint) and it passed after adding test-file eslint disables.npm --prefix chatapi run test:integrationwhich executed the new assistant integration scenarios and reportedassistant integration tests passed.npm test -- --watch=false --browsers=ChromeHeadless --include=src/app/manager-dashboard/manager-aiservices.component.spec.ts, which failed in this environment because the Angular CLI (ng) is not installed, so browser-based unit runner could not run here.Codex Task