- Removed specific model aliases for various models (e.g., "gpt-4.1-mini", "phi-4", "grok-3-mini").
- Replaced the `get_model` method with a simplified approach using `get_alias` for alias resolution.
- Updated model alias management in `PollinationsAI` to handle model aliases in `get_models` method.
- Refined the logic for adding models to `text_models` and `vision_models` in `PollinationsAI`.
- Replaced `deepseek-v3` and other model aliases with direct models in `PollinationsAI`.
- Modified `Ollama` class to handle local models and improve model fetching with API key.
- Changed the `create_async_generator` in `Ollama` to support local model handling and proxy use.
- Updated `Azure` class to remove unused `extra_body` argument and streamline stream handling.
- Updated model providers in `g4f/models.py` to remove certain providers (e.g., `PollinationsAI`) from `best_provider` lists for some models.
- In `g4f/Provider/needs_auth/LMArenaBeta.py`, import `has_nodriver` from `...requests` in the same line as other imports
- Change `working` attribute to be set based on `has_nodriver` instead of `True`
- Add new class attribute `active_by_default = True` to `LMArenaBeta`
- In `g4f/cli/__init__.py`, change `--cookie-browsers` argument choices to use `g4f.cookies.BROWSERS` instead of `g4f.cookies.browsers`
- In `g4f/cli/__init__.py`, update `run_api_args` to assign to `g4f.cookies.BROWSERS` instead of `g4f.cookies.browsers`
- In `g4f/gui/gui_parser.py`, change import from `browsers` to `BROWSERS`
- In `g4f/gui/gui_parser.py`, update `--cookie-browsers` argument choices to use `BROWSERS` instead of `browsers`
- In `g4f/gui/run.py`, update `run_gui_args` to assign to `g4f.cookies.BROWSERS` instead of `g4f.cookies.browsers
- In `g4f/__init__.py`, changed logger setup to use fixed "g4f" name and refactored `ChatCompletion.create` and `create_async` to share `_prepare_request` logic for preprocessing arguments
- In `g4f/config.py`, added `__future__.annotations`, `lru_cache` import, wrapped `get_config_dir` with `@lru_cache`, and simplified platform branch logic
- In `g4f/cookies.py`, added typing imports, renamed `browsers` to `BROWSERS`, reformatted `DOMAINS`, updated docstrings, improved loop logic in `load_cookies_from_browsers` with additional exception handling, split HAR/JSON parsing into `_parse_har_file` and `_parse_json_cookie_file`, and enhanced `read_cookie_files` with optional filters and `.env` loading
- In `g4f/debug.py`, added enable/disable logging functions, updated log handler typing, appended messages to `logs` in `log()`, and improved `error()` formatting
- In `g4f/errors.py`, introduced base `G4FError` and updated all exception classes to inherit from it or relevant subclasses, with descriptive docstrings for each
- In `g4f/files.py`, added `max_length` parameter to `secure_filename`, adjusted regex formatting, and added docstring; updated `get_bucket_dir` to sanitize parts inline with docstring
- In `g4f/typing.py`, added `__future__.annotations`, reorganized imports, restricted PIL import to type-checking, defined `ContentPart` and `Message` TypedDicts, updated type aliases and `__all__` to include new types
- In `g4f/version.py`, added `lru_cache` and request timeout constant, applied caching to `get_pypi_version` and `get_github_version`, added response validation and explicit exceptions, refactored `VersionUtils.current_version` with clearer sources and error on miss, changed `check_version` to return a boolean with optional silent mode, and improved error handling outputs
- **g4f/Provider/Copilot.py**
- Added `"Smart (GPT-5)"` to `models` list.
- Added `"gpt-5"` alias mapping to `"GPT-5"` in `model_aliases`.
- Introduced `mode` selection logic to support `"smart"` mode for GPT-5 models alongside existing `"reasoning"` and `"chat"` modes.
- **g4f/Provider/EasyChat.py**
- Added `get_models` class method to map `-free` models to aliases and store them in `cls.models`.
- Resolved model via `cls.get_model(model)` at start of `create_async_generator`.
- Reset `cls.captchaToken` to `None` at the beginning of `callback`.
- Wrapped main generator logic in a loop to allow retry once if `CLEAR-CAPTCHA-TOKEN` error occurs, clearing auth file and resetting args.
- **g4f/Provider/needs_auth/OpenaiChat.py**
- Added handling for image models: detect and set `image_model` flag, use `default_model` when sending requests if image model selected, and include `"picture_v2"` in `system_hints` when applicable.
- Replaced textarea/button detection code in page load sequence with `nodriver` `select` calls, sending "Hello" before clicking send button, and included profile button selection if class needs auth.
- **g4f/Provider/openai/models.py**
- Changed `default_image_model` from `"dall-e-3"` to `"gpt-image"`.
- Added `"gpt-5"` and `"gpt-5-thinking"` to `text_models` list.
- Added alias mapping for `"dall-e-3"` pointing to new `default_image_model`.
- Added `Qwen` to `g4f/Provider/__init__.py` for provider registration
- Created new Qwen provider in `g4f/Provider/Qwen.py` using `AsyncGeneratorProvider`
- Implemented conversation state via new `JsonConversation` argument
- Replaced raw `print` statements with `debug.log` for internal logging
- Introduced `get_last_user_message()` for improved prompt extraction
- Added support for `Reasoning` and `Usage` response types during SSE parsing
- Replaced manual SSE parsing with `sse_stream()` utility from `requests`
- Added `active_by_default = True` to `Qwen` and modified related headers
- Tracked message and parent IDs for contextual threading
- Updated `Usage` class in `g4f/providers/response.py` to support `input_tokens` and `output_tokens`
- Refactored Nvidia provider: removed unused attributes and set `models_needs_auth = True
- 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
- Added new `EasyChat` provider (`g4f/Provider/EasyChat.py`) with captcha handling, nodriver callback, and token caching
- Added new `GLM` provider (`g4f/Provider/GLM.py`) with model retrieval, auth token fetch, and SSE streaming support
- Updated `g4f/Provider/__init__.py` to import `EasyChat` and `GLM`
- Modified `LMArenaBeta` in `g4f/Provider/needs_auth/LMArenaBeta.py` to remove nodriver availability check and always use `get_args_from_nodriver` with callback
- Updated `HuggingFaceAPI` in `g4f/Provider/needs_auth/hf/HuggingFaceAPI.py` to use `default_model` from `models` instead of `default_llama_model` and removed commented `max_inputs_lenght` param
- Updated `HuggingFace` in `g4f/Provider/needs_auth/hf/__init__.py` to import `default_model` instead of `default_vision_model`, set `default_model` class attribute, and commented out HuggingFaceInference and image model handling logic
- Modified `OpenaiTemplate` in `g4f/Provider/template/OpenaiTemplate.py` to prefer `"name"` over `"id"` when populating `vision_models`, `models`, and `models_count`
- Enhanced `sse_stream` in `g4f/requests/__init__.py` to strip and skip empty `data:` lines, handle JSON decode errors, and raise `ValueError` on invalid JSON
- Added `OPENROUTER_API_KEY` and `AZURE_API_KEYS` to `example.env`.
- Updated `AZURE_DEFAULT_MODEL` to "model-router" in `example.env`.
- Added `AZURE_ROUTES` with multiple model URLs in `example.env`.
- Changed the mapping for `"phi-4-multimodal"` in `DeepInfraChat.py` to `"microsoft/Phi-4-multimodal-instruct"`.
- Added `media` parameter to `GptOss.create_completion` method and raised a `ValueError` if `media` is provided.
- Updated `model_aliases` in `any_model_map.py` to include new mappings for various models.
- Removed several model aliases from `PollinationsAI` in `any_model_map.py`.
- Added new models and updated existing models in `model_map` across various files, including `any_model_map.py` and `__init__.py`.
- Refactored `AnyModelProviderMixin` to include `model_aliases` and updated the logic for handling model aliases.