From f448fd8a0bffaf867bc36e5515d8ca93a2b75175 Mon Sep 17 00:00:00 2001 From: Amitayush Thakur Date: Tue, 13 May 2025 09:49:04 +0000 Subject: [PATCH 1/2] Added gpt-4o-mini --- src/copra/gpts/gpt_access.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/copra/gpts/gpt_access.py b/src/copra/gpts/gpt_access.py index fbd2af7..63b6cb0 100644 --- a/src/copra/gpts/gpt_access.py +++ b/src/copra/gpts/gpt_access.py @@ -66,6 +66,11 @@ class GptAccess: "request_limit_per_min": 8000, "max_token_per_prompt": int(1.2 * 10**5) }, + "o4-mini": { + "token_limit_per_min": 8000000, + "request_limit_per_min": 8000, + "max_token_per_prompt": int(1.2 * 10**5) + }, "claude-3-7-sonnet-20250219": { "token_limit_per_min": 40000, "request_limit_per_min": 1000, @@ -85,6 +90,7 @@ class GptAccess: "o1": ".secrets/openai_key.json", "o3": ".secrets/openai_key.json", "o3-mini": ".secrets/openai_key.json", + "o4-mini": ".secrets/openai_key.json", "claude-3-7-sonnet-20250219": ".secrets/anthropic_key.json" } @@ -179,6 +185,7 @@ def complete_chat(self, if self.is_open_ai_model or self.is_anthropic_model: if self.model_name.startswith("o1") or \ self.model_name.startswith("o3") or \ + self.model_name.startswith("o4") or \ self.is_anthropic_model: messages = self.handle_thinking_messages(messages) return_responses, usage, stopping_reasons = \ @@ -224,7 +231,7 @@ def handle_thinking_messages(self, messages: typing.List[typing.Dict[str, str]]) def get_thinking_response(self, model, messages, max_tokens, stop : typing.List[str], reasoning_token_count, reasoning_effort) -> typing.Tuple[list, dict, str]: response = None - if self.is_open_ai_model and model == "o1-mini": + if self.is_open_ai_model and model == "o1-mini" or model == "o4-mini": response = self.client.chat.completions.create( model=model, messages=messages, @@ -359,6 +366,9 @@ def _run_chat_test(self, model_name: str, token_count: int): def test_o3_mini_model(self): self._run_chat_test("o3-mini", token_count=100) + + def test_o4_mini_model(self): + self._run_chat_test("o4-mini", token_count=100) def test_gpt4o_model(self): self._run_chat_test("gpt-4o", token_count=100) From 8ab49f851674589a606297eec529c24e4f3e8ea0 Mon Sep 17 00:00:00 2001 From: Amitayush Thakur Date: Tue, 13 May 2025 09:50:01 +0000 Subject: [PATCH 2/2] Updated the pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8584a43..43ba94d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ packages = ["src/copra"] [project] name = "copra-theorem-prover" -version = "1.1.6" +version = "1.1.7" authors = [ { name="Amitayush Thakur", email="amitayush@utexas.edu" }, ]