- **ApiAirforce.py**: Added `use_image_size = True` class attribute.
- **EasyChat.py**: Added `user_data_dir=None` argument when calling `get_args_from_nodriver`.
- **LMArenaBeta.py**:
- Only set `cls.share_url` from `G4F_SHARE_URL` if `cls.share_url` is `None`.
- Added `user_data_dir=None` argument when calling `get_args_from_nodriver`.
- Modified media filtering to check `url` is a `str` before `startswith("https://")`.
- **OpenaiTemplate.py**:
- Added `use_image_size = False` class attribute.
- Modified image generation payload to optionally include `"size"` key when `use_image_size` is `True` and width/height present.
- Refactored `read_response` to store `content` in a variable, strip on first chunk, and yield `ToolCalls` directly from `tool_calls` variable.
- **g4f/requests/__init__.py**:
- Added `user_data_dir` parameter (default `"nodriver"`) to `get_args_from_nodriver`.
- Passed `user_data_dir` to `get_nodriver` call.
- 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.
- 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.
- Added new provider `GptOss` in `g4f/Provider/GptOss.py` with support for async message generation via SSE
- Registered `GptOss` in `g4f/Provider/__init__.py`
- Implemented logic in `GptOss.create_async_generator` to handle both new and existing conversations with SSE streaming response handling
- Handled event types including `thread.created`, `thread.item_updated`, and `thread.updated` within `GptOss`
- Modified `read_response` in `OpenaiTemplate.py` to yield `Reasoning` objects using `reasoning_content` or fallback to `reasoning` from `choice["delta"]
- Changed "Inference API" to "Interference API" and updated corresponding documentation links in README.md
- Removed "o1" and "dall-e-3" entries from Copilot.py model_aliases
- Added "stream" and "extra_body" parameters with default values in Azure.py's create_async_generator method
- In CopilotAccount.py, included model_aliases with "gpt-4", "gpt-4o", "o1", and "dall-e-3"
- Updated conditional for provider comparison from "==" to "in" list in any_provider.py
- Modified g4f/api/__init__.py to set g4f_api_key from environment variable
- In backend_api.py, added "user" field to cached data with default "unknown"
- Changed logic in OpenaiTemplate.py read_response to check if "choice" exists before processing, and cleaned up indentation and conditionals in response parsing
- Removed unnecessary "stop" and "prompt" parameters from comments or unused code in OpenaiTemplate.py
- Tightened the check for "provider" comparison in any_provider.py to handle multiple providers properly
- Replaced all imports and usages of `see_stream` with `sse_stream` across:
- `g4f/Provider/Kimi.py`
- `g4f/Provider/hf_space/BlackForestLabs_Flux1KontextDev.py`
- `g4f/Provider/needs_auth/PuterJS.py`
- `g4f/Provider/template/OpenaiTemplate.py`
- `g4f/requests/__init__.py` (renamed function `see_stream` to `sse_stream`)
- Modified `g4f/Provider/needs_auth/GeminiPro.py`:
- Updated `default_model` from `gemini-2.5-flash-preview-04-17` to `gemini-2.5-flash`
- Removed `gemini-2.5-flash-preview-04-17` from `fallback_models`
- Updated `etc/tool/md2html.py`:
- Added `re` import
- Changed `process_single_file_with_output` to check if output file exists
- If exists, uses regex to update `<title>` and `itemprop="text">` content instead of writing full template
- If not, generates HTML using the template as before
- Removed extension of `vision_models` into `text_models` in `PollinationsAI.get_models`
- Unified image parameter handling in `PollinationsAI.create_payload`, removing special case for `"gptimage"` model
- Added conditional inclusion of `"transparent"` and `"image"` params based on `transparent` flag and media content
- Replaced `quote_plus` with `quote` for URL encoding in query string construction
- In `OpenaiTemplate.create_payload`, wrapped media URL extraction in `iter()` to fix `next()` usage with list comprehension
- Added GithubCopilotAPI provider to g4f/Provider/needs_auth and __init__.py
- Fixed typo "GGOGLE_SID_COOKIE" to "GOOGLE_SID_COOKIE" in Gemini.py and updated all references
- Updated PollinationsAI.py:
- Refined model aliases and removed/commented unused/legacy aliases
- Updated logic for loading audio and vision models, using swap_models for alias reversals
- Adjusted get_model and model loading methods for accuracy
- Changed default model lists for text, image, and vision models
- Updated conversation title and followup labels for followups tools
- Modified save_content in g4f/cli/client.py to handle url downloads for lists, allow cookies/headers, and removed duplicate HTTP download logic
- Added asyncio sleep after stdout writes in stream_response for smoother streaming
- Changed website.py render default to "home," adjusted chat route to accept any filename, and updated filenames used for rendering
- Updated model selection in g4f/models.py by removing PollinationsAI from best_provider and changing model provider order for specific models
- Enhanced media merging in g4f/tools/media.py to clarify comment about last user message and handle content appending for lists in render_messages
- Updated OpenaiTemplate.py to add an image_url field if media with http(s) URLs is present
- Adjusted test_provider_has_model in etc/unittest/models.py to skip providers requiring auth
- Removed the line retrieving "voice" from "audio" key inside the PollinationsAI.py file
- Changed the condition in OpenaiTemplate.py from checking "choices" in data to "choices" in data before accessing data["choices"][0] in OpenaiTemplate.py
- Added `create_function` and `async_create_function` class attributes with default implementations in `base_provider.py` for `AbstractProvider`, `AsyncProvider`, and `AsyncGeneratorProvider`
- Updated `get_create_function` and `get_async_create_function` methods to return these class attributes
- Replaced calls to `provider.get_create_function()` and `provider.get_async_create_function()` with direct attribute access `provider.create_function` and `provider.async_create_function` across `g4f/__init__.py`, `g4f/client/__init__.py`, `g4f/providers/retry_provider.py`, and `g4f/tools/run_tools.py`
- Removed redundant `get_create_function` and `get_async_create_function` methods from `providers/base_provider.py` and `providers/types.py`
- Ensured all provider response calls now use the class attributes for creating completions asynchronously and synchronously as needed
- Updated imports to use format_media_prompt in g4f/Provider/ARTA.py, PollinationsAI.py, PollinationsImage.py, Websim.py, audio/OpenAIFM.py, hf_space/BlackForestLabs_Flux1Dev.py, hf_space/DeepseekAI_JanusPro7b.py, hf_space/G4F.py, hf_space/Microsoft_Phi_4_Multimodal.py, hf_space/StabilityAI_SD35Large.py, needs_auth/BingCreateImages.py, needs_auth/BlackboxPro.py, needs_auth/DeepInfra.py, needs_auth/Gemini.py, needs_auth/MicrosoftDesigner.py, needs_auth/OpenaiChat.py, needs_auth/hf/HuggingChat.py, needs_auth/hf/HuggingFaceInference.py, needs_auth/hf/HuggingFaceMedia.py, not_working/AllenAI.py, template/OpenaiTemplate.py, api.py, and gui/server/api.py
- Replaced calls to format_image_prompt with format_media_prompt in relevant locations
- Changed media prompt handling in various providers to ensure consistent usage of format_media_prompt
- Modified the __aenter__ and __aexit__ methods of requests/aiohttp.py to properly manage ClientSession lifecycle
- Changed the default value of `extra_body` from an empty dictionary to `None` in `ImageLabs` and `PollinationsAI` classes.
- Added a check to initialize `extra_body` to an empty dictionary if it is `None` in the `ImageLabs` class.
- Removed the `extra_image_models` list from the `PollinationsAI` class.
- Updated the way image models are combined in the `PollinationsAI` class to avoid duplicates.
- Changed the error handling for unsupported models from `ModelNotSupportedError` to `ModelNotFoundError` in multiple classes including `OpenaiChat`, `HuggingFaceAPI`, and `HuggingFaceInference`.
- Updated the `save_response_media` function to handle both string and bytes responses.
- Adjusted the handling of audio data in the `PollinationsAI` class to ensure proper processing of audio responses.
- Fixed duplicate model entries in Blackbox provider model_aliases
- Added meta-llama- to llama- name cleaning in Cloudflare provider
- Enhanced PollinationsAI provider with improved vision model detection
- Added reasoning support to PollinationsAI provider
- Fixed HuggingChat authentication to include headers and impersonate
- Removed unused max_inputs_length parameter from HuggingFaceAPI
- Renamed extra_data to extra_body for consistency across providers
- Added Puter provider with grouped model support
- Enhanced AnyProvider with grouped model display and better model organization
- Fixed model cleaning in AnyProvider to handle more model name variations
- Added api_key handling for HuggingFace providers in AnyProvider
- Added see_stream helper function to parse event streams
- Updated GUI server to handle JsonConversation properly
- Fixed aspect ratio handling in image generation functions
- Added ResponsesConfig and ClientResponse for new API endpoint
- Updated requirements to include markitdown