Skip to content

Conversation

@OEvortex
Copy link
Collaborator

@OEvortex OEvortex commented Dec 18, 2025

User description

…implementations

  • Deleted PerplexityLabs and TeachAnything providers due to redundancy or deprecation.
  • Updated TypliAI to support new model identifiers and improved user agent handling.
  • Enhanced TurboSeek to convert HTML responses to Markdown and improved error handling.
  • Adjusted streaming and non-streaming response handling in TurboSeek for better consistency.
  • Cleaned up imports and removed unused code across affected files.
    This pull request introduces a new OpenAI-compatible TypliAI provider, removes the PerplexityLabs and TeachAnything providers, updates provider documentation and statistics, and improves the TurboSeek provider's response handling. Additionally, it adds an auto-generated developer documentation summary for webscout/Extra/gguf.py.

Provider changes:

  • Added a new OpenAI-compatible TypliAI provider with streaming and non-streaming support for multiple models, and registered it in the provider initialization and documentation. [1] [2] [3] [4]
  • Removed PerplexityLabs and TeachAnything providers, including their files, documentation entries, and references in the provider initialization. [1] [2]

Documentation and statistics updates:

  • Updated Provider.md to reflect the addition and removal of providers, adjusting provider counts and statistics accordingly. [1] [2] [3]
  • Added an auto-generated developer documentation summary for webscout/Extra/gguf.py in docs/gguf.md.

Bug fixes and improvements:

  • Improved the TurboSeek provider to handle a new HTML-based raw stream response format and enhanced HTML-to-Markdown conversion.

CodeAnt-AI Description

Add OpenAI-compatible TypliAI provider; remove PerplexityLabs and TeachAnything; convert TurboSeek HTML streams to Markdown

What Changed

  • Added a new OpenAI-compatible TypliAI provider with streaming and non-streaming chat support and a curated list of available models (GPT-4.1/5, Gemini 2.5, Claude 4.5, Grok 4).
  • Removed PerplexityLabs and TeachAnything providers and their entries from provider exports and documentation, reducing deprecated/duplicated providers visible to users.
  • TurboSeek now accepts raw HTML stream output, returns cleaned Markdown for non-stream calls, and yields cleaned text chunks in streaming mode so responses are more readable.
  • Updated provider indexes, README/Provider.md counts, and changelog to reflect the additions and removals.

Impact

✅ New OpenAI-compatible TypliAI for GPT-4/5/Gemini/Claude/Grok
✅ Fewer deprecated providers listed
✅ TurboSeek delivers readable Markdown for full responses

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

…implementations

- Deleted PerplexityLabs and TeachAnything providers due to redundancy or deprecation.
- Updated TypliAI to support new model identifiers and improved user agent handling.
- Enhanced TurboSeek to convert HTML responses to Markdown and improved error handling.
- Adjusted streaming and non-streaming response handling in TurboSeek for better consistency.
- Cleaned up imports and removed unused code across affected files.

Signed-off-by: OEvortex <abhat8283@gmail.com>
Copilot AI review requested due to automatic review settings December 18, 2025 07:06
@codeant-ai
Copy link

codeant-ai bot commented Dec 18, 2025

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai bot added the size:L This PR changes 100-499 lines, ignoring generated files label Dec 18, 2025
@OEvortex OEvortex merged commit f4f9304 into main Dec 18, 2025
6 checks passed
@OEvortex OEvortex deleted the worktree-2025-12-18T06-56-24 branch December 18, 2025 07:08
Copy link
Contributor

Copilot AI left a 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 refactors provider implementations by removing two obsolete providers (PerplexityLabs and TeachAnything), updating TypliAI with new model support and dual implementation formats, and enhancing TurboSeek's HTML response handling with Markdown conversion.

  • Removes PerplexityLabs and TeachAnything providers that are redundant or deprecated
  • Adds OpenAI-compatible TypliAI implementation alongside the existing standard implementation
  • Updates TurboSeek to convert HTML responses to Markdown format
  • Updates model identifiers and API payload structures for TypliAI
  • Adjusts provider documentation and statistics to reflect the changes

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
webscout/Provider/turboseek.py Enhanced with HTML-to-Markdown conversion method and updated streaming/non-streaming response handling
webscout/Provider/TypliAI.py Updated with new model identifiers, revised headers, and modified payload structure for API compatibility
webscout/Provider/OPENAI/typliai.py New OpenAI-compatible implementation with streaming and non-streaming support
webscout/Provider/TeachAnything.py Deleted - provider removed as obsolete
webscout/Provider/Perplexitylabs.py Deleted - provider removed as deprecated
webscout/Provider/init.py Removed imports for deleted providers
webscout/Provider/OPENAI/init.py Added import for new TypliAI OpenAI-compatible provider
Provider.md Updated provider counts and statistics (33 dual, 21 normal-only, 60 total)
changelog.md Added changelog entry for version 2025.12.18
docs/gguf.md Added auto-generated developer documentation summary

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +118 to +119
text = re.sub(r'<(strong|b)[^>]*>(.*?)</\1>', r'**\2**', text)
text = re.sub(r'<(em|i)[^>]*>(.*?)</\1>', r'*\2*', text)
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

The regex pattern uses \1 as a backreference, but \1 refers to the first captured group (strong|b). Since these are alternatives (strong OR b), the backreference may not match the closing tag correctly in all cases. For example, if the opening tag is <strong>, the pattern expects </strong>, but with this regex structure it should work. However, this pattern assumes well-formed HTML. Consider using separate patterns for each tag type or adding a comment explaining this assumes well-formed HTML.

Copilot uses AI. Check for mistakes.
to_json=True,
intro_value=None,
to_json=False,
strip_chars='', # Disable default lstrip to preserve spacing
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

The parameter strip_chars='' disables the default lstrip behavior. This could preserve unwanted whitespace at the beginning of chunks, which may lead to formatting issues. Ensure this is the intended behavior, or document why this is necessary.

Copilot uses AI. Check for mistakes.
self.headers = {
'accept': '*/*', # Changed from '/' in example, but '*' is safer
'accept-language': 'en-US,en;q=0.9',
'accept': '/',
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

The 'accept' header value is changed from '/' to '/' which is not a valid HTTP accept header value. The correct wildcard value should be '/'. This typo could cause the API to reject requests or behave unexpectedly.

Suggested change
'accept': '/',
'accept': '*/*',

Copilot uses AI. Check for mistakes.
Comment on lines +218 to +226
# Iterate over the stream in raw mode to get full HTML
# We use ask(..., raw=True) internally or just the local for_stream
# Actually, let's just make a sub-call
response = self.session.post(
self.chat_endpoint,
json=payload,
timeout=self.timeout,
impersonate="chrome120"
)
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

The non-streaming mode makes a second HTTP request (lines 221-226) instead of reusing the streaming response. This duplicates the network call and could lead to inconsistent responses between streaming and non-streaming modes. Consider aggregating the streaming response instead of making a separate request.

Copilot uses AI. Check for mistakes.
@property
def models(self):
class _ModelList:
def list(inner_self):
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

Normal methods should have 'self', rather than 'inner_self', as their first parameter.

Suggested change
def list(inner_self):
def list(self):

Copilot uses AI. Check for mistakes.
TypliAI OpenAI-compatible provider.
"""

import json
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

Import of 'json' is not used.

Suggested change
import json

Copilot uses AI. Check for mistakes.
self.completions = Completions(client)


class TypliAI(OpenAICompatibleProvider):
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

This class does not call OpenAICompatibleProvider.init during initialization. (TypliAI.init may be missing a call to a base class init)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants