Skip to content

Commit b9e77e7

Browse files
committed
fix(adapters): consume full GPT-5.x.y identity versions
1 parent cea531d commit b9e77e7

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎src/adapters/identity.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const CODEX_GPT5_IDENTITY_LINE_AGENT = "You are Codex, an agent based on
2525
* Avoid a broad `You are Codex.*` rewrite that could touch unrelated content.
2626
*/
2727
const CODEX_GPT5_IDENTITY_RE =
28-
/You are Codex, (?:a coding agent|an agent) based on GPT-5(?:\.[0-9]+)?\./g;
28+
/You are Codex, (?:a coding agent|an agent) based on GPT-5(?:\.[0-9]+)*\./g;
2929

3030
/** Proxy-neutral replacement: no "opencodex proxy" mention, just the GPT-5/OpenAI disclaimer. */
3131
export const NEUTRAL_IDENTITY_LINE = "You are a coding agent. Do not claim to be GPT-5 or to be made by OpenAI.";

‎tests/identity-neutralize.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ describe("identity neutralization — central helper", () => {
3131
test("replaces the Codex CLI 0.145 'an agent' identity variant (#622)", () => {
3232
expect(neutralizeIdentity(CODEX_GPT5_IDENTITY_LINE_AGENT)).toBe(NEUTRAL_IDENTITY_LINE);
3333
expect(neutralizeIdentity("You are Codex, an agent based on GPT-5.4.")).toBe(NEUTRAL_IDENTITY_LINE);
34+
expect(neutralizeIdentity("You are Codex, an agent based on GPT-5.4.1.")).toBe(NEUTRAL_IDENTITY_LINE);
3435
});
3536

3637
test("never emits the opencodex proxy identity", () => {

0 commit comments

Comments
 (0)