File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use serde::Deserialize;
55use serde_json:: json;
66use std:: time:: Duration ;
77
8- // OpenAI responses API (for gpt-5.1-codex-max ) and chat completions (for other chat models)
8+ // OpenAI responses API (for gpt-5 models ) and chat completions (for other chat models)
99const OPENAI_API_BASE : & str = "https://api.openai.com/v1" ;
1010const REQUEST_TIMEOUT : Duration = super :: anthropic:: REQUEST_TIMEOUT ;
1111
@@ -37,8 +37,8 @@ impl OpenAIClient {
3737 & self ,
3838 request : CreateMessageRequest ,
3939 ) -> Result < CreateMessageResponse > {
40- // gpt-5.1-codex-max uses the /responses endpoint with `input`
41- if request. model . contains ( "gpt-5.1-codex " ) {
40+ // gpt-5 models use the /responses endpoint with `input`
41+ if request. model . starts_with ( "gpt-5" ) {
4242 return self . call_responses ( request) . await ;
4343 }
4444
You can’t perform that action at this time.
0 commit comments