- Rename DeepInfraChat to DeepInfra across all files
- Move DeepInfra from needs_auth to main Provider directory
- Rename LMArenaBeta to LMArena throughout codebase
- Move search-related providers to new search subdirectory (GoogleSearch, SearXNG, YouTube)
- Move deprecated providers to not_working directory (Free2GPT, LegacyLMArena, PenguinAI, ImageLabs, har)
- Add new Mintlify provider with custom AI assistant implementation
- Update Anthropic provider with Claude 4 models and Opus 4.1 parameter handling
- Update Grok provider with Grok 4 models and improved streaming support
- Update GithubCopilot with expanded model list including o3-mini, o4-mini, gpt-5 previews
- Update LambdaChat default model from deepseek-r1 to deepseek-llama3.3-70b
- Update TeachAnything default model from gemini-1.5-pro to gemma
- Remove DeepInfra from needs_auth directory
- Update all model_map references from DeepInfraChat to DeepInfra
- Update all model_map references from LMArenaBeta to LMArena
- Add beta_headers support to Anthropic for special features
- Improve Mintlify provider with system prompt handling and streaming
- Update model configurations in models.py to reflect provider changes
- Added `await asyncio.sleep(1)` inside captcha verification loop in `EasyChat.py` to introduce delay between checks
- Modified `Grok.py` to send "Hello" input to a selected textarea element during auth flow
- Added delay after sending keys to textarea in `Grok.py` using `await asyncio.sleep(1)`
- Added logic to select and click a submit button if present in `Grok.py` during header check loop
- All changes are within the `EasyChat` and `Grok` class definitions respectively
- In `Grok.py`, replaced `browser.main_tab` with `await browser.get(cls.url)` to ensure correct page initialization
- Reordered page actions in `Grok.py` by invoking `await page.reload()` after attaching request handler
- In `Video.py`, modified prompt encoding by applying `.encode()[:100].decode("utf-8", "ignore").strip()` to handle non-UTF-8 characters safely
- Replaced single try block for clicking "Create" button with retry loop (up to 60 attempts), including exception handling and fallback browser stop
- In `client.py`, changed model assignment logic to check `self.provider is None` before overwriting existing value
- Updated conversation data merging logic in `client.py` to preserve existing `self.data` using dictionary unpacking instead of overwriting completely
- Added UUID-based "x-xai-request-id" header and 403 error handling in Grok.py
- Updated backend_api.py to handle empty media results and unsupported file types with error raising and file cleanup
- Simplified render logic in website.py by removing is_live flag and related code
- Changed "audio/wav" MIME type to "audio/x-wav" in image/__init__.py
- Added is_valid_media and is_valid_audio functions to image/__init__.py for stricter media validation
- Enhanced MarkItDown integration in markitdown/__init__.py with convert_stream method supporting non-seekable streams
- Modified _transcribe_audio.py to use recognize_faster_whisper if available, fallback to recognize_google
- Updated providers/helper.py to prioritize "text" key in to_string function
- Improved stream_read_files in files.py to skip DOWNLOADS_FILE and adjust code block formatting
- Added get_filename_from_url utility in files.py for consistent filename generation from URLs
- Enhanced download_urls in files.py to use MarkItDown for URL conversion and improved error logging
- Improved render_part and related functions in media.py to use new media validation logic and handle more cases
- Adjusted merge_media and render_messages in media.py for stricter part filtering and validation
* feat: enhance provider support and add PuterJS provider
- Add new PuterJS provider with extensive model support and authentication handling
- Add three new OIVSCode providers (OIVSCodeSer2, OIVSCodeSer5, OIVSCodeSer0501)
- Fix Blackbox provider with improved model handling and session generation
- Update model aliases across multiple providers for consistency
- Mark DDG provider as not working
- Move TypeGPT to not_working directory
- Fix model name formatting in DeepInfraChat and other providers (qwen3 → qwen-3)
- Add get_model method to LambdaChat and other providers for better model alias handling
- Add ModelNotFoundError import to providers that need it
- Update model definitions in models.py with new providers and aliases
- Fix client/stubs.py to allow arbitrary types in ChatCompletionMessage
* Fix conflicts g4f/Provider/needs_auth/Grok.py
* fix: update Blackbox provider default settings
- Changed parameter to use only the passed value without fallback to 1024
- Set to instead of in request payload
* feat: add WeWordle provider with gpt-4 support
- Created new WeWordle.py provider file implementing AsyncGeneratorProvider
- Added WeWordle class with API endpoint at wewordle.org/gptapi/v1/web/turbo
- Set provider properties: working=True, needs_auth=False, supports_stream=True
- Configured default_model as 'gpt-4' with retry mechanism for API requests
- Implemented URL sanitization logic to handle malformed URLs
- Added response parsing for different JSON response formats
- Added WeWordle to Provider/__init__.py imports
- Added WeWordle to default model providers list in models.py
- Added WeWordle to gpt_4 best_provider list in models.py
* feat: add DocsBot provider with GPT-4o support
- Added new DocsBot.py provider file implementing AsyncGeneratorProvider and ProviderModelMixin
- Created Conversation class extending JsonConversation to track conversation state
- Implemented create_async_generator method with support for:
- Streaming and non-streaming responses
- System messages
- Message history
- Image handling via data URIs
- Conversation tracking
- Added DocsBot to Provider/__init__.py imports
- Added DocsBot to default and default_vision model providers in models.py
- Added DocsBot as a provider for gpt_4o model in models.py
- Set default_model and vision support to 'gpt-4o'
- Implemented API endpoint communication with docsbot.ai
* feat: add OpenAIFM provider and update audio model references
- Added new OpenAIFM provider in g4f/Provider/audio/OpenAIFM.py for text-to-speech functionality
- Updated PollinationsAI.py to rename "gpt-4o-audio" to "gpt-4o-mini-audio"
- Added OpenAIFM to audio provider imports in g4f/Provider/audio/__init__.py
- Modified save_response_media() in g4f/image/copy_images.py to handle source_url separately from media_url
- Added new gpt_4o_mini_tts AudioModel in g4f/models.py with OpenAIFM as best provider
- Updated ModelUtils dictionary in models.py to include both gpt_4o_mini_audio and gpt_4o_mini_tts
* fix: improve PuterJS provider and add Gemini to best providers
- Changed client_id generation in PuterJS from time-based to UUID format
- Fixed duplicate json import in PuterJS.py
- Added uuid module import in PuterJS.py
- Changed host header from "api.puter.com" to "puter.com"
- Modified error handling to use Exception instead of RateLimitError
- Added Gemini to best_provider list for gemini-2.5-flash model
- Added Gemini to best_provider list for gemini-2.5-pro model
- Fixed missing newline at end of Gemini.py file
---------
Co-authored-by: kqlio67 <kqlio67.noreply.github.com>
- Changed default value of `return_conversation` from `False` to `True` in `Grok._create_completion` method in `g4f/Provider/needs_auth/Grok.py`
- Updated HTTP 200 response mapping to use `{"content": {"audio/*": {}}}` instead of `{"class": FileResponse}` in `Api.markdown_to_audio` method in `g4f/api/__init__.py
- **g4f/Provider/har/__init__.py**
- `get_models`/`create_async`: iterate over `(domain, harFile)` and filter with `domain in request_url`
- `read_har_files` now yields `(domain, har_data)`; fixes file variable shadowing and uses `json.load`
- remove stray `print`, add type hint for `find_str`, replace manual loops with `yield from`
- small whitespace clean-up
- **g4f/Provider/needs_auth/Grok.py**
- `ImagePreview` now passes `auth_result.cookies` and `auth_result.headers`
- **g4f/Provider/needs_auth/OpenaiChat.py**
- add `Union` import; rename/refactor `get_generated_images` → `get_generated_image`
- support `file-service://` and `sediment://` pointers; choose correct download URL
- return `ImagePreview` or `ImageResponse` accordingly and stream each image part
- propagate 422 errors, update prompt assignment and image handling paths
- **g4f/client/__init__.py**
- drop unused `ignore_working` parameter in sync/async `Completions`
- normalise `media` argument: accept single tuple, infer filename when missing, fix index loop
- `Images.create_variation` updated to use the new media logic
- **g4f/gui/server/api.py**
- expose `latest_version_cached` via `?cache=` query parameter
- **g4f/gui/server/backend_api.py**
- optional Markdown extraction via `MarkItDown`; save rendered text as `<file>.md`
- upload flow rewrites: copy to temp file, move to bucket/media dir, clean temp, store filenames
- introduce `has_markitdown` guard and improved logging/exception handling
- **g4f/tools/files.py**
- remove trailing spaces in HAR code-block header string
- **g4f/version.py**
- add `latest_version_cached` `@cached_property` for memoised version lookup