|
| 1 | +# Code interpreter will work, but needs special handling of responses or throws error: |
| 2 | +# ResponseCodeInterpreterToolCall has no attribute 'content' |
| 3 | + |
| 4 | +models = { |
| 5 | + # === GPT-5 family === |
| 6 | + "gpt-5": { |
| 7 | + "api_style": "responses", |
| 8 | + "returns_thoughts": True, # reasoning traces supported by GPT-5/o-series |
| 9 | + "parameters": { |
| 10 | + "reasoning": { |
| 11 | + "type": "object", |
| 12 | + "properties": { |
| 13 | + "effort": { |
| 14 | + "type": "choice", |
| 15 | + "default": "medium", |
| 16 | + "choices": ["low", "medium", "high"], |
| 17 | + "description": "Controls model’s internal reasoning effort" |
| 18 | + } |
| 19 | + } |
| 20 | + } |
| 21 | + }, |
| 22 | + "built_in_tools": [ |
| 23 | + {"id": "web_search", "description": "Performs a web search.", "tool_config": {"type": "web_search", "search_context_size": "auto"}}, |
| 24 | + # {"id": "code_interpreter", "description": "Executes code snippets in a secure environment.", "tool_config": {"type": "code_interpreter","container": {"type": "auto"}}} |
| 25 | + # {"id": "image_generation", "description": "Generates images via the GPT Image tool.", "tool_config": {"type": "gpt_image"}} # No way to recover images yet |
| 26 | + ] |
| 27 | + }, |
| 28 | + "gpt-5-mini": { |
| 29 | + "api_style": "responses", |
| 30 | + "returns_thoughts": True, |
| 31 | + "parameters": { |
| 32 | + "reasoning": { |
| 33 | + "type": "object", |
| 34 | + "properties": { |
| 35 | + "effort": { |
| 36 | + "type": "choice", |
| 37 | + "default": "low", |
| 38 | + "choices": ["disable", "low", "medium", "high"], |
| 39 | + "description": "Reasoning effort (can be disabled)" |
| 40 | + } |
| 41 | + } |
| 42 | + } |
| 43 | + }, |
| 44 | + "built_in_tools": [ |
| 45 | + {"id": "web_search", "description": "Performs a web search.", "tool_config": {"type": "web_search", "search_context_size": "auto"}}, |
| 46 | + # {"id": "code_interpreter", "description": "Executes code snippets in a secure environment.", "tool_config": {"type": "code_interpreter","container": {"type": "auto"}}} |
| 47 | + # {"id": "image_generation", "description": "Generates images via the GPT Image tool.", "tool_config": {"type": "gpt_image"}} # No way to recover images yet |
| 48 | + ] |
| 49 | + }, |
| 50 | + "gpt-5-nano": { |
| 51 | + "api_style": "responses", |
| 52 | + "returns_thoughts": False, |
| 53 | + "parameters": { |
| 54 | + }, |
| 55 | + "built_in_tools": [ |
| 56 | + {"id": "web_search", "description": "Performs a web search.", "tool_config": {"type": "web_search", "search_context_size": "auto"}}, |
| 57 | + # {"id": "code_interpreter", "description": "Executes code snippets in a secure environment.", "tool_config": {"type": "code_interpreter","container": {"type": "auto"}}} |
| 58 | + ] |
| 59 | + }, |
| 60 | + |
| 61 | + # === O-series (reasoning) === |
| 62 | + "o4-mini": { |
| 63 | + "api_style": "responses", |
| 64 | + "returns_thoughts": True, |
| 65 | + "parameters": { |
| 66 | + "temperature": {"type": "float", "default": 0.6, "min": 0.0, "max": 2.0}, |
| 67 | + |
| 68 | + "reasoning": { |
| 69 | + "type": "object", |
| 70 | + "properties": { |
| 71 | + "effort": {"type": "choice", "default": "medium", "choices": ["low", "medium", "high"]} |
| 72 | + } |
| 73 | + } |
| 74 | + }, |
| 75 | + "built_in_tools": [ |
| 76 | + {"id": "web_search", "description": "Performs a web search.", "tool_config": {"type": "web_search", "search_context_size": "auto"}}, |
| 77 | + # {"id": "code_interpreter", "description": "Executes code snippets in a secure environment.", "tool_config": {"type": "code_interpreter","container": {"type": "auto"}}} |
| 78 | + ] |
| 79 | + }, |
| 80 | + "o3-mini": { |
| 81 | + "api_style": "responses", |
| 82 | + "returns_thoughts": True, |
| 83 | + "parameters": { |
| 84 | + "temperature": {"type": "float", "default": 0.6, "min": 0.0, "max": 2.0}, |
| 85 | + "reasoning": { |
| 86 | + "type": "object", |
| 87 | + "properties": { |
| 88 | + "effort": {"type": "choice", "default": "low", "choices": ["low", "medium", "high"]} |
| 89 | + } |
| 90 | + } |
| 91 | + }, |
| 92 | + "built_in_tools": [ |
| 93 | + {"id": "web_search", "description": "Performs a web search.", "tool_config": {"type": "web_search", "search_context_size": "auto"}}, |
| 94 | + # {"id": "code_interpreter", "description": "Executes code snippets in a secure environment.", "tool_config": {"type": "code_interpreter","container": {"type": "auto"}}} |
| 95 | + ] |
| 96 | + }, |
| 97 | + |
| 98 | + # === GPT-4.x family still available via API === |
| 99 | + "gpt-4.1": { |
| 100 | + "api_style": "responses", |
| 101 | + "returns_thoughts": False, |
| 102 | + "parameters": { |
| 103 | + "temperature": {"type": "float", "default": 0.7, "min": 0.0, "max": 2.0}, |
| 104 | + }, |
| 105 | + "built_in_tools": [ |
| 106 | + {"id": "web_search", "description": "Performs a web search.", "tool_config": {"type": "web_search_preview", "search_context_size": "low"}}, |
| 107 | + {"id": "image_generation", "description": "Generates images via the GPT Image tool.", "tool_config": {"type": "gpt_image"}} |
| 108 | + ] |
| 109 | + }, |
| 110 | + "gpt-4.1-mini": { |
| 111 | + "api_style": "responses", |
| 112 | + "returns_thoughts": False, |
| 113 | + "parameters": { |
| 114 | + "temperature": {"type": "float", "default": 0.7, "min": 0.0, "max": 2.0}, |
| 115 | + }, |
| 116 | + "built_in_tools": [ |
| 117 | + {"id": "web_search", "description": "Performs a web search.", "tool_config": {"type": "web_search", "search_context_size": "auto"}}, |
| 118 | + # {"id": "code_interpreter", "description": "Executes code snippets in a secure environment.", "tool_config": {"type": "code_interpreter","container": {"type": "auto"}}} |
| 119 | + ] |
| 120 | + }, |
| 121 | + "gpt-4o": { |
| 122 | + "api_style": "responses", |
| 123 | + "returns_thoughts": False, |
| 124 | + "parameters": { |
| 125 | + "temperature": {"type": "float", "default": 0.7, "min": 0.0, "max": 2.0}, |
| 126 | + }, |
| 127 | + "built_in_tools": [ |
| 128 | + {"id": "web_search", "description": "Performs a web search.", "tool_config": {"type": "web_search", "search_context_size": "auto"}}, |
| 129 | + # {"id": "code_interpreter", "description": "Executes code snippets in a secure environment.", "tool_config": {"type": "code_interpreter","container": {"type": "auto"}}} |
| 130 | + ] |
| 131 | + }, |
| 132 | + "gpt-4o-mini": { |
| 133 | + "api_style": "responses", |
| 134 | + "returns_thoughts": False, |
| 135 | + "parameters": { |
| 136 | + "temperature": {"type": "float", "default": 0.7, "min": 0.0, "max": 2.0}, |
| 137 | + }, |
| 138 | + "built_in_tools": [ |
| 139 | + {"id": "web_search", "description": "Performs a web search.", "tool_config": {"type": "web_search_preview", "search_context_size": "low"}}, |
| 140 | + # {"id": "image_generation", "description": "Generates images via the GPT Image tool.", "tool_config": {"type": "gpt_image"}}, |
| 141 | + # {"id": "code_interpreter", "description": "Executes code snippets in a secure environment.", "tool_config": {"type": "code_interpreter","container": {"type": "auto"}}} |
| 142 | + ] |
| 143 | + }, |
| 144 | + |
| 145 | +} |
0 commit comments