extra_forbidden error
Resolved 💬 3 comments Opened Apr 16, 2025 by James76931 Closed Apr 16, 2025
💡 Likely answer: A maintainer (tibo-openai, collaborator)
responded on this thread — see the highlighted reply below.
Hi guys, I tried to get Codex to create a web app using a photo of a flowchart I drew on paper. Got to the actually creating code bit and was given this error. This is using gpt-4.1 and MacOS Sequoia 15.4.
Command I used was codex -m gpt-4.1 -a full-auto -i /Users/james/Desktop/AD0FC415-4EFD-46D1-B0E4-47B31314865C_1_102_a.jpeg
file:///Users/james/.nvm/versions/node/v22.14.0/lib/node_modules/@openai/codex/dist/cli.js:443
`,"\r"]);pg.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function Fwe(e,t){for(let a=t??0;a<e.length;a++){if(e[a]===10)return{preceding:a,index:a+1,carriage:!1};if(e[a]===13)return{preceding:a,index:a+1,carriage:!0}}return null}function Tae(e){for(let n=0;n<e.length-1;n++){if(e[n]===10&&e[n+1]===10||e[n]===13&&e[n+1]===13)return n+2;if(e[n]===13&&e[n+1]===10&&n+3<e.length&&e[n+2]===13&&e[n+3]===10)return n+4}return-1}g();function UO(e){if(e[Symbol.asyncIterator])return e;let t=e.getReader();return{async next(){try{let r=await t.read();return r?.done&&t.releaseLock(),r}catch(r){throw t.releaseLock(),r}},async return(){let r=t.cancel();return t.releaseLock(),await r,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}var nd=class e{constructor(t,r){this.iterator=t,this.controller=r}static fromSSEResponse(t,r){let n=!1;async function*a(){if(n)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let i=!1;try{for await(let s of Pwe(t,r))if(!i){if(s.data.startsWith("[DONE]")){i=!0;continue}if(s.event===null||s.event.startsWith("response.")||s.event.startsWith("transcript.")){let c;try{c=JSON.parse(s.data)}catch(p){throw console.error("Could not parse message into JSON:",s.data),console.error("From chunk:",s.raw),p}if(c&&c.error)throw new mi(void 0,c.error,void 0,zO(t.headers));yield c}else{let c;try{c=JSON.parse(s.data)}catch(p){throw console.error("Could not parse message into JSON:",s.data),console.error("From chunk:",s.raw),p}if(s.event=="error")throw new mi(void 0,c.error,c.message,void 0);yield{event:s.event,data:c}}}i=!0}catch(s){if(s instanceof Error&&s.name==="AbortError")return;throw s}finally{i||r.abort()}}return new e(a,r)}static fromReadableStream(t,r){let n=!1;async function*a(){let s=new pg,c=UO(t);for await(let p of c)for(let f of s.decode(p))yield f;for(let p of s.flush())yield p}async function*i(){if(n)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let s=!1;try{for await(let c of a())s||c&&(yield JSON.parse(c));s=!0}catch(c){if(c instanceof Error&&c.name==="AbortError")return;throw c}finally{s||r.abort()}}return new e(i,r)}[Symbol.asyncIterator](){return this.iterator()}tee(){let t=[],r=[],n=this.iterator(),a=i=>({next:()=>{if(i.length===0){let s=n.next();t.push(s),r.push(s)}return i.shift()}});return[new e(()=>a(t),this.controller),new e(()=>a(r),this.controller)]}toReadableStream(){let t=this,r,n=new TextEncoder;return new wN({async start(){r=t[Symbol.asyncIterator]()},async pull(a){try{let{value:i,done:s}=await r.next();if(s)return a.close();let c=n.encode(JSON.stringify(i)+`
e [Error]: [{'type': 'extra_forbidden', 'loc': ('body', 'service_tier'), 'msg': 'Extra inputs are not permitted', 'input': 'auto'}]
at e.a [as iterator] (file:///Users/james/.nvm/versions/node/v22.14.0/lib/node_modules/@openai/codex/dist/cli.js:443:1514)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async I0.run (file:///Users/james/.nvm/versions/node/v22.14.0/lib/node_modules/@openai/codex/dist/cli.js:460:2513) {
status: undefined,
headers: undefined,
request_id: undefined,
error: {
type: 'invalid_request_error',
code: null,
message: "[{'type': 'extra_forbidden', 'loc': ('body', 'service_tier'), 'msg': 'Extra inputs are not permitted', 'input': 'auto'}]",
param: null
},
code: null,
param: null,
type: 'invalid_request_error'
}
3 Comments
We traced it to image inputs, team is looking into this. If this is happening for non image inputs, please expand here with more information as that would be surprising to us.
this happens when attaching an image
also i think once it worked, but it ignored the prompt and asked what i wanted to do about the image.
Should be resolved (we fixed this on the api side) and shouldn't need anything else on your end.