mirror of
https://github.com/openai/codex.git
synced 2026-12-03 00:41:03 +00:00
Retire the personality feature flag and document deprecated settings (#45809)
## What changed - Accept and ignore `features.personality` in user configuration, profiles, and managed requirements. - Remove feature gating from `personality = "none"`, which strips the literal `# Personality` section when preparing model catalog instructions. Preserve explicit base instructions and existing thread instructions. - Document deprecated personality fields in configuration, app-server schemas, and the Python SDK: `friendly` and `pragmatic` no longer select a style, and `supportsPersonality` is always `false`. ## Testing Add regression coverage for ignored legacy flag values and managed requirements, personality opt-out behavior with the flag absent or set to either value, role overrides, and preservation of explicit base instructions, including empty strings. GitOrigin-RevId: 4e12c66b42bfc59d6f151a5b3c28fadc6654ae99
This commit is contained in:
@@ -297,7 +297,11 @@ class Codex:
|
||||
# END GENERATED: Codex.flat_methods
|
||||
|
||||
def models(self, *, include_hidden: bool = False) -> ModelListResponse:
|
||||
"""List available models reported by Codex."""
|
||||
"""List available models reported by Codex.
|
||||
|
||||
The deprecated ``Model.supports_personality`` field is always ``False``
|
||||
on the current app-server.
|
||||
"""
|
||||
return self._client.model_list(include_hidden=include_hidden)
|
||||
|
||||
|
||||
@@ -557,6 +561,11 @@ class AsyncCodex:
|
||||
# END GENERATED: AsyncCodex.flat_methods
|
||||
|
||||
async def models(self, *, include_hidden: bool = False) -> ModelListResponse:
|
||||
"""List available models reported by Codex.
|
||||
|
||||
The deprecated ``Model.supports_personality`` field is always ``False``
|
||||
on the current app-server.
|
||||
"""
|
||||
await self._ensure_initialized()
|
||||
return await self._client.model_list(include_hidden=include_hidden)
|
||||
|
||||
|
||||
@@ -5834,7 +5834,12 @@ class ThreadResumeParams(BaseModel):
|
||||
str | None, Field(description="Configuration overrides for the resumed thread, if any.")
|
||||
] = None
|
||||
model_provider: Annotated[str | None, Field(alias="modelProvider")] = None
|
||||
personality: Personality | None = None
|
||||
personality: Annotated[
|
||||
Personality | None,
|
||||
Field(
|
||||
description="@deprecated `friendly` and `pragmatic` no longer select a style. Changing this does not rewrite the thread's existing instructions."
|
||||
),
|
||||
] = None
|
||||
sandbox: SandboxMode | None = None
|
||||
service_tier: Annotated[str | None, Field(alias="serviceTier")] = None
|
||||
thread_id: Annotated[str, Field(alias="threadId")]
|
||||
@@ -8521,7 +8526,13 @@ class Model(BaseModel):
|
||||
supported_reasoning_efforts: Annotated[
|
||||
list[ReasoningEffortOption], Field(alias="supportedReasoningEfforts")
|
||||
]
|
||||
supports_personality: Annotated[bool | None, Field(alias="supportsPersonality")] = False
|
||||
supports_personality: Annotated[
|
||||
bool | None,
|
||||
Field(
|
||||
alias="supportsPersonality",
|
||||
description="@deprecated Always false; models no longer support personality selection.",
|
||||
),
|
||||
] = False
|
||||
upgrade: str | None = None
|
||||
upgrade_info: Annotated[ModelUpgradeInfo | None, Field(alias="upgradeInfo")] = None
|
||||
|
||||
@@ -9971,7 +9982,12 @@ class ThreadSettings(BaseModel):
|
||||
effort: ReasoningEffort | None = None
|
||||
model: str
|
||||
model_provider: Annotated[str, Field(alias="modelProvider")]
|
||||
personality: Personality | None = None
|
||||
personality: Annotated[
|
||||
Personality | None,
|
||||
Field(
|
||||
description="@deprecated Reports the saved setting; `friendly` and `pragmatic` no longer select a style."
|
||||
),
|
||||
] = None
|
||||
sandbox_policy: Annotated[SandboxPolicy, Field(alias="sandboxPolicy")]
|
||||
service_tier: Annotated[str | None, Field(alias="serviceTier")] = None
|
||||
summary: ReasoningSummary | None = None
|
||||
@@ -10004,7 +10020,10 @@ class ThreadStartParams(BaseModel):
|
||||
ephemeral: bool | None = None
|
||||
model: str | None = None
|
||||
model_provider: Annotated[str | None, Field(alias="modelProvider")] = None
|
||||
personality: Personality | None = None
|
||||
personality: Annotated[
|
||||
Personality | None,
|
||||
Field(description="@deprecated `friendly` and `pragmatic` no longer select a style."),
|
||||
] = None
|
||||
sandbox: SandboxMode | None = None
|
||||
service_name: Annotated[str | None, Field(alias="serviceName")] = None
|
||||
service_tier: Annotated[str | None, Field(alias="serviceTier")] = None
|
||||
@@ -10424,7 +10443,7 @@ class ConfigBatchWriteParams(BaseModel):
|
||||
bool | None,
|
||||
Field(
|
||||
alias="reloadUserConfig",
|
||||
description="When true, hot-reload updated runtime settings into loaded threads after writing. Session-static model, reasoning-effort, Plan-mode reasoning-effort, service-tier, and personality defaults are not reloaded.",
|
||||
description="When true, hot-reload updated runtime settings into loaded threads after writing. Session-static model, reasoning-effort, Plan-mode reasoning-effort, and service-tier defaults are not reloaded. The deprecated personality setting is also not reloaded.",
|
||||
),
|
||||
] = None
|
||||
|
||||
@@ -12141,7 +12160,9 @@ class TurnStartParams(BaseModel):
|
||||
] = None
|
||||
personality: Annotated[
|
||||
Personality | None,
|
||||
Field(description="Override the personality for this turn and subsequent turns."),
|
||||
Field(
|
||||
description="@deprecated `friendly` and `pragmatic` no longer select a style. Changing this does not rewrite the thread's existing instructions."
|
||||
),
|
||||
] = None
|
||||
sandbox_policy: Annotated[
|
||||
SandboxPolicy | None,
|
||||
|
||||
Reference in New Issue
Block a user