-
-
Notifications
You must be signed in to change notification settings - Fork 59
New providers and removed unused imports and packages #112
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
Conversation
- Updated type hints to use Optional where applicable in multiple files including `mojeek.py`, `wikipedia.py`, and Yahoo-related modules. - Added default empty string for keywords in search functions to prevent NoneType issues. - Enhanced error handling in Yep search modules to use getattr for response checking. - Improved JSON handling in `utils.py` to ensure compatibility with orjson and standard json. - Refactored server request processing to handle error responses more robustly. - Adjusted command and option decorators in `swiftcli` to accept Optional parameters. - General cleanup and consistency improvements in type annotations and error messages throughout the codebase. Signed-off-by: OEvortex <[email protected]>
- Update provider exports to reference DeepInfra - Move webscout/swiftcli Readme.md to docs/swiftcli.md - Add ZeroArt documentation and docs/zeroart.md - Remove orjson from pyproject.toml and adjust deps - Apply minor typing/import cleanups across modules - Add cookies.json fixture and sample script (lol.py) - Update AGENTS.md and related README references
- Normalize typing imports across modules (consistent order) (Any, Dict, Generator, List, Optional, Union, cast) - Remove deprecated providers: Venice, YEP, VercelAI
… class Signed-off-by: OEvortex <[email protected]>
- Removed unnecessary blank lines and added type hints in various files for better clarity. - Updated the `llmchat.py`, `llmchatco.py`, and `oivscode.py` files to enhance import organization. - Enhanced the `text`, `images`, `videos`, `news`, `weather`, `answers`, `suggestions`, `translate`, and `maps` functions in `cli.py` to check for method existence before calling, improving error handling. - Introduced a new `InvalidResponseError` exception in `exceptions.py` for better API response validation. - Improved type hinting and added docstrings in `litagent/agent.py` for better code documentation. - Updated `http_client.py` to ensure consistent formatting and improved readability. - Enhanced server configuration handling in `server.py` for better clarity and maintainability. - Improved the `update_checker.py` to handle version retrieval more gracefully. Signed-off-by: OEvortex <[email protected]>
- Updated type hints across various modules for better clarity and type safety. - Consolidated parameter handling in TTS provider methods to utilize **kwargs for flexibility. - Improved error handling and response extraction in multiple AI provider classes. - Standardized the use of Optional and Union types for better type hinting consistency. - Refactored initialization methods in TTS providers to accept Optional dict for proxies. - Enhanced streaming response handling in ChatHub and other AI classes. - Cleaned up unused imports and improved import statements for clarity. - Fixed minor bugs related to response handling and parameter defaults. Signed-off-by: OEvortex <[email protected]>
- Updated constructor and method signatures to use double quotes for strings. - Added missing commas in dictionary and list definitions for better readability. - Improved error handling and response extraction in various providers. - Enhanced type hinting and added TypedDict for structured data in DuckDuckGo weather. - Streamlined the TTS providers by consolidating parameters and improving default handling. - Ensured consistent logging and debugging output across providers. - Fixed minor formatting issues and ensured compliance with PEP 8 style guide. Signed-off-by: OEvortex <[email protected]>
- Added type hints for better clarity and type safety in `learnfastai.py`, `llama3mitril.py`, `llmchat.py`, `llmchatco.py`, `oivscode.py`, `sonus.py`, `toolbaz.py`, `turboseek.py`, `typefully.py`, and `crawler.py`. - Improved response handling in `llmchat.py`, `llmchatco.py`, `sonus.py`, and `toolbaz.py` by ensuring proper type checks and casting. - Updated `ScoutCrawler` to handle user-agent strings more robustly and ensure compatibility with optional dependencies. - Enhanced HTML parsing in `html5lib_parser.py`, `html_parser.py`, and `lxml_parser.py` to support both string and bytes input. - Improved error handling and validation in `duckduckgo` search engines and server request models. - General code cleanup and consistency improvements across various files, including better handling of optional parameters and default values. Signed-off-by: OEvortex <[email protected]>
…e files Signed-off-by: OEvortex <[email protected]>
…ple providers Signed-off-by: OEvortex <[email protected]>
Signed-off-by: OEvortex <[email protected]>
…t integration Signed-off-by: OEvortex <[email protected]>
…vely - Remove beautifulsoup4 from pyproject.toml parser dependencies - Update changelog.md to remove beautifulsoup4 references for 2026.01.01 - Update docs/scout.md to focus on webscout/scout native implementation - Fix huggingface_hub ModuleNotFoundError with lazy imports in gguf.py - Update README.md with GGUF lazy import note for 2026.01.01 All HTML parsing now uses webscout/scout module exclusively, simplifying dependencies and improving consistency across the codebase.
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.
Pull request overview
This pull request focuses on code quality improvements and refactoring across OpenAI-compatible provider implementations. The changes primarily involve formatting standardization, import reorganization, type safety enhancements, and consistent error handling patterns.
Key Changes
- Standardized import statements and added
casttype for better type safety - Replaced custom model list implementations with
SimpleModelListutility class - Migrated providers from
cloudscraperandrequeststocurl_cffifor improved HTTP handling - Removed the Venice provider implementation entirely
Reviewed changes
Copilot reviewed 112 out of 258 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| webscout/Provider/OPENAI/wisecat.py | Import reorganization, formatting fixes, and type hints |
| webscout/Provider/OPENAI/venice.py | Complete file removal (460 lines deleted) |
| webscout/Provider/OPENAI/utils.py | Added cast and Union type imports |
| webscout/Provider/OPENAI/typliai.py | Import cleanup, formatting, and SimpleModelList adoption |
| webscout/Provider/OPENAI/typefully.py | Import updates and models property refactoring |
| webscout/Provider/OPENAI/toolbaz.py | Migration from cloudscraper to curl_cffi |
| webscout/Provider/OPENAI/textpollinations.py | Type safety improvements and formatting |
| webscout/Provider/OPENAI/sonus.py | Migration to curl_cffi and code cleanup |
| webscout/Provider/OPENAI/sambanova.py | Import organization and formatting fixes |
| webscout/Provider/OPENAI/openrouter.py | New provider implementation with dynamic model fetching |
| webscout/Provider/OPENAI/oivscode.py | Formatting and SimpleModelList adoption |
| webscout/Provider/OPENAI/nvidia.py | Import cleanup and type safety improvements |
| webscout/Provider/OPENAI/netwrck.py | Formatting standardization |
| webscout/Provider/OPENAI/meta.py | Type hints and Optional parameter updates |
| webscout/Provider/OPENAI/llmchatco.py | Import reorganization and formatting |
| webscout/Provider/OPENAI/llmchat.py | Migration to curl_cffi and cleanup |
| webscout/Provider/OPENAI/ibm.py | Import updates and formatting fixes |
| webscout/Provider/OPENAI/huggingface.py | Type safety and formatting improvements |
| webscout/Provider/OPENAI/heckai.py | Import cleanup and SimpleModelList adoption |
| webscout/Provider/OPENAI/hadadxyz.py | Formatting standardization and type hints |
| webscout/Provider/OPENAI/groq.py | Optional parameter type updates |
| webscout/Provider/OPENAI/gradient.py | Import organization and formatting |
| webscout/Provider/OPENAI/freeassist.py | Type safety improvements |
| webscout/Provider/OPENAI/exaai.py | Import cleanup and formatting fixes |
| webscout/Provider/OPENAI/elmo.py | SimpleModelList adoption and formatting |
| webscout/Provider/OPENAI/deepinfra.py | Import updates and Optional types |
| webscout/Provider/OPENAI/chatsandbox.py | Import reorganization and cleanup |
| webscout/Provider/OPENAI/chatgpt.py | Extensive formatting and type safety improvements |
| webscout/Provider/OPENAI/cerebras.py | Migration updates and proxies handling |
| webscout/Provider/OPENAI/base.py | Added SimpleModelList import and required_auth field |
| webscout/Provider/OPENAI/ayle.py | Formatting and SimpleModelList adoption |
| webscout/Provider/OPENAI/algion.py | Type safety and proxies handling improvements |
| webscout/Provider/AISEARCH/webpilotai_search.py | Type hints and return type updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: OEvortex <[email protected]>
This pull request includes major dependency removals, new provider additions, documentation updates, and refactoring for improved compatibility and maintainability. The most impactful changes are the removal of unused dependencies, the addition of the OpenRouter provider, and updates to provider and documentation files to reflect these changes.
Dependency and Provider Refactoring
pyproject.tomland codebase for better compatibility and simplicity:google-generativeai,openai,orjson,nodriver,aiofiles, andcloudscraper. Also replacedaiofilesandcloudscraperusage in code with standard library orcurl_cffialternatives.webscout/Provider/VercelAI.pyprovider file and updated related documentation and provider lists to reflect its removal. [1] [2]webscout/Provider/OpenRouter.pyandwebscout/Provider/OPENAI/openrouter.py. Updated all relevant documentation and provider matrix files. [1] [2]toolbaz,sonus,LLMChat,LLMChatCo,AISEARCH/iask_search) fromrequests,cloudscraper, andaiohttptocurl_cffifor improved HTTP handling and browser fingerprinting.Documentation and Guidance Updates
Provider.md,README.md,docs/models.md,docs/README.md) to reflect provider removals/additions, new model support, and dependency changes. Corrected provider counts and removed deprecated references (e.g., Venice TTI provider, VercelAI). [1] [2] [3] [4]AGENTS.mdby updating recommended commands for dependency management and type checking, clarifying the use ofuv, and emphasizing focused, clean code contributions. [1] [2] [3]Bug Fixes and Optional Dependencies
huggingface_hubin GGUF conversion utilities, fixing import errors for users who do not require GGUF features and providing clearer error messages when needed. [1] [2]lxmlan optional dependency for HTML parsing, updating relevant modules and documentation to support environments withoutlxmlinstalled. [1] [2]Model and Provider List Updates
Miscellaneous Improvements
SwiftCLIdocs, adding ZeroArt ASCII generator documentation). [1] [2]