mirror of
https://github.com/openai/codex.git
synced 2026-05-06 06:12:59 +03:00
release ready, enabling only for siwc users (#17046)
**Disabling Image-Gen for Non-SIWC Codex Users** We are only enabling image-gen feature for SIWC Codex users until there comes a fix in ResponsesAPI to omit output from responses.completed, to prevent the following issues: 1. websocket blows up due to heavier load (images) than before (text) 2. http parser streams through n^2 of n-base64 bytes (sum of base64s of all images generated in turn) that causes long delays in turn_completion.
This commit is contained in:
@@ -118,6 +118,7 @@ pub struct ToolsConfigParams<'a> {
|
||||
pub model_info: &'a ModelInfo,
|
||||
pub available_models: &'a [ModelPreset],
|
||||
pub features: &'a Features,
|
||||
pub image_generation_tool_auth_allowed: bool,
|
||||
pub web_search_mode: Option<WebSearchMode>,
|
||||
pub session_source: SessionSource,
|
||||
pub sandbox_policy: &'a SandboxPolicy,
|
||||
@@ -130,6 +131,7 @@ impl ToolsConfig {
|
||||
model_info,
|
||||
available_models,
|
||||
features,
|
||||
image_generation_tool_auth_allowed,
|
||||
web_search_mode,
|
||||
session_source,
|
||||
sandbox_policy,
|
||||
@@ -152,8 +154,11 @@ impl ToolsConfig {
|
||||
&& features.enabled(Feature::Apps)
|
||||
&& features.enabled(Feature::Plugins);
|
||||
let include_original_image_detail = can_request_original_image_detail(features, model_info);
|
||||
let include_image_gen_tool =
|
||||
features.enabled(Feature::ImageGeneration) && supports_image_generation(model_info);
|
||||
// API-key auth bypasses Codex backend entitlement/tool normalization, so
|
||||
// callers must confirm ChatGPT auth before exposing the built-in tool.
|
||||
let include_image_gen_tool = *image_generation_tool_auth_allowed
|
||||
&& features.enabled(Feature::ImageGeneration)
|
||||
&& supports_image_generation(model_info);
|
||||
let exec_permission_approvals_enabled = features.enabled(Feature::ExecPermissionApprovals);
|
||||
let request_permissions_tool_enabled = features.enabled(Feature::RequestPermissionsTool);
|
||||
let shell_command_backend =
|
||||
|
||||
Reference in New Issue
Block a user