-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[VIBE CODED] Feat: Intelligent provider #4100
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?
Conversation
Add new "Intelligent Provider" that automatically selects appropriate provider profiles (easy, medium, hard) based on request complexity. Includes schema definitions, API handler, UI components, validation, and internationalization support for seamless integration.
|
|
Neat! It says WIP, but does it work? Would like to try it. |
@mcowger yeah it's working, i want to make more improvements though. Open to ideas and suggestions. Also as you know about the profile id bug, i can't save the profile sometimes, but turns out it's the released version, I thought that was on me 🫠 |
…lidation handling - Streamline classifier prompt to be more concise and focused - Extract task classification to separate variable for clarity - Add validation error propagation from IntelligentProvider to ApiOptions - Improve parent component error handling with onValidationChange callback
Refactor IntelligentHandler to assess task difficulty only once per user message instead of on every createMessage call. Add rawUserPrompt and isInitialMessage metadata to track assessment state, implement assessment caching with race condition prevention, and update UI components to exclude intelligent provider from model listings.
Introduce frontend-based keyword assessment for task difficulty in the intelligent provider. This reduces redundant AI evaluations by pre-assessing and caching difficulty levels, allowing the handler to reuse results across conversations and task resets. Updates include new interface fields, event-driven state management, and UI integration for sending pre-assessed difficulty with messages.
|
hey @mcowger if you're intrested you can now try this provider |
- Consolidate profile handlers into unified ProfileMap structure - Move type definitions to shared types module for better reusability - Extract classifier prompt as class constant for maintainability - Refactor profile loading logic to use helper methods and parallel execution - Remove frontend difficulty assessment logic to streamline chat component - Extract validation logic into custom hook for better separation of concerns
Remove the preAssessedDifficulty property from task options, interfaces, and handlers to simplify the codebase, as it is no longer needed after recent restructuring.
Context
Auto Provider that will switch between 3 profiles based on task difficulty, can possibly reduce cost and setup for simple task without switching profile
Implementation
Vibecoded inspired by the Gemini CLI auto model to use AI as the classifier for the difficulty
Screenshots
How to Test
Use it in the provider
Get in Touch
ivanarifin