From 2f38a70d32dcdc5cea9a814aa04545e36305e19a Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sat, 9 Aug 2025 05:01:07 +0000 Subject: [PATCH] Update default model from gpt-4o to gpt-5 Co-Authored-By: talosgma@gmail.com --- AGENTS.md | 2 +- docs/api/core.md | 6 +++--- docs/api/services.md | 2 +- docs/architecture/agents.md | 6 +++--- docs/architecture/hypervisor.md | 2 +- docs/cli/proposals.md | 4 ++-- docs/development/code-style.md | 10 +++++----- docs/development/contributing.md | 4 ++-- docs/development/testing.md | 6 +++--- examples/proposal_example.py | 2 +- integration_tests/test_memory_integration.py | 4 ++-- integration_tests/test_memory_prompt_fix.py | 2 +- integration_tests/test_memory_tool_availability.py | 2 +- src/talos/cli/README.md | 2 +- src/talos/cli/daemon.py | 2 +- src/talos/cli/main.py | 4 ++-- src/talos/cli/proposals.py | 2 +- src/talos/core/memory.py | 4 ++-- src/talos/skills/twitter_persona.py | 2 +- src/talos/skills/twitter_voice.py | 2 +- tests/test_scheduled_jobs.py | 4 ++-- 21 files changed, 37 insertions(+), 37 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index ada4a338..52cfbf98 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -26,7 +26,7 @@ Please adhere to the following code style guidelines: ## General Guidance -* The default model for this project is `gpt-4o`. +* The default model for this project is `gpt-5`. * Write clear and descriptive commit messages. * Break down large changes into smaller, logical commits. * Ensure that all new code is covered by tests. diff --git a/docs/api/core.md b/docs/api/core.md index aec6d176..d51266d3 100644 --- a/docs/api/core.md +++ b/docs/api/core.md @@ -13,14 +13,14 @@ class Agent: def __init__( self, name: str, - model: str = "gpt-4o", + model: str = "gpt-5", memory: Optional[Memory] = None ): """Initialize an agent with specified configuration. Args: name: Unique identifier for the agent - model: LLM model to use (default: "gpt-4o") + model: LLM model to use (default: "gpt-5") memory: Optional memory instance for conversation history """ ``` @@ -259,7 +259,7 @@ class AgentConfig(BaseModel): model_config = ConfigDict(arbitrary_types_allowed=True) name: str - model: str = "gpt-4o" + model: str = "gpt-5" temperature: float = Field(default=0.7, ge=0.0, le=2.0) max_tokens: int = Field(default=1000, gt=0) memory_enabled: bool = True diff --git a/docs/api/services.md b/docs/api/services.md index b1acb085..49c5b9a6 100644 --- a/docs/api/services.md +++ b/docs/api/services.md @@ -53,7 +53,7 @@ Calculates optimal staking APR using market data and sentiment analysis. ```python class YieldManagerService(Service): - def __init__(self, model: str = "gpt-4o"): + def __init__(self, model: str = "gpt-5"): """Initialize yield manager service. Args: diff --git a/docs/architecture/agents.md b/docs/architecture/agents.md index c39330b8..c3a79585 100644 --- a/docs/architecture/agents.md +++ b/docs/architecture/agents.md @@ -37,7 +37,7 @@ class MainAgent: The `Agent` class provides core functionality inherited by all specialized agents: **Core Features:** -- **LLM Interaction** - Standardized interface to language models (default: GPT-4o) +- **LLM Interaction** - Standardized interface to language models (default: GPT-5) - **Conversation History** - Maintains context across interactions using message history - **Memory Integration** - Semantic search and retrieval of past conversations - **Prompt Management** - Template-based prompt system with dynamic loading @@ -45,7 +45,7 @@ The `Agent` class provides core functionality inherited by all specialized agent **Implementation Details:** ```python class Agent: - def __init__(self, model: str = "gpt-4o"): + def __init__(self, model: str = "gpt-5"): self.model = model self.history = [] self.memory = Memory() @@ -153,7 +153,7 @@ Agents can be configured with different LLM models: ```python # Default configuration -agent = Agent(model="gpt-4o") +agent = Agent(model="gpt-5") # Custom model for specific tasks code_review_agent = Agent(model="gpt-4o-code") diff --git a/docs/architecture/hypervisor.md b/docs/architecture/hypervisor.md index 50ecd6e1..becc5644 100644 --- a/docs/architecture/hypervisor.md +++ b/docs/architecture/hypervisor.md @@ -248,7 +248,7 @@ approval_settings: ```yaml hypervisor: supervisor: "hybrid" - llm_model: "gpt-4o" + llm_model: "gpt-5" confidence_threshold: 0.8 risk_categories: diff --git a/docs/cli/proposals.md b/docs/cli/proposals.md index f330c1ed..b20d4841 100644 --- a/docs/cli/proposals.md +++ b/docs/cli/proposals.md @@ -16,7 +16,7 @@ uv run talos proposals eval --file - `--file, -f`: Path to the proposal file (required) **Options:** -- `--model-name`: LLM model to use (default: "gpt-4o") +- `--model-name`: LLM model to use (default: "gpt-5") - `--temperature`: Temperature for LLM generation (default: 0.0) ## Usage Examples @@ -28,7 +28,7 @@ uv run talos proposals eval --file uv run talos proposals eval --file governance_proposal.txt # Use a different model -uv run talos proposals eval --file proposal.md --model-name gpt-4o --temperature 0.1 +uv run talos proposals eval --file proposal.md --model-name gpt-5 --temperature 0.1 ``` ### Proposal File Format diff --git a/docs/development/code-style.md b/docs/development/code-style.md index bdd6e775..64452f87 100644 --- a/docs/development/code-style.md +++ b/docs/development/code-style.md @@ -84,7 +84,7 @@ Use Google-style docstrings for all modules, classes, and functions: ```python def analyze_sentiment( text: str, - model: str = "gpt-4o", + model: str = "gpt-5", confidence_threshold: float = 0.7 ) -> SentimentResult: """Analyze sentiment of the given text using an LLM. @@ -94,7 +94,7 @@ def analyze_sentiment( Args: text: The text to analyze for sentiment. Must not be empty. - model: The LLM model to use for analysis. Defaults to "gpt-4o". + model: The LLM model to use for analysis. Defaults to "gpt-5". confidence_threshold: Minimum confidence score to return results. Must be between 0.0 and 1.0. @@ -137,7 +137,7 @@ class AgentConfig(BaseModel): extra='forbid' ) - model_name: str = Field(default="gpt-4o", description="LLM model to use") + model_name: str = Field(default="gpt-5", description="LLM model to use") temperature: float = Field(default=0.7, ge=0.0, le=2.0) max_tokens: int = Field(default=1000, gt=0) ``` @@ -151,7 +151,7 @@ class Agent(BaseModel): model_config = ConfigDict(arbitrary_types_allowed=True) name: str - model: str = "gpt-4o" + model: str = "gpt-5" memory: Memory | None = None def model_post_init(self, __context: Any) -> None: @@ -384,7 +384,7 @@ def mock_openai_client(): def test_agent(mock_openai_client): """Create test agent with mocked dependencies.""" with patch('talos.core.agent.OpenAI', return_value=mock_openai_client): - return Agent(name="test_agent", model="gpt-4o") + return Agent(name="test_agent", model="gpt-5") def test_agent_generates_response(test_agent): """Test that agent generates appropriate response.""" diff --git a/docs/development/contributing.md b/docs/development/contributing.md index 80b64224..32415871 100644 --- a/docs/development/contributing.md +++ b/docs/development/contributing.md @@ -197,7 +197,7 @@ from talos.utils.helpers import format_response ```python def test_agent_processes_query_successfully(): # Arrange - agent = Agent(model="gpt-4o") + agent = Agent(model="gpt-5") query = "What is the current market sentiment?" # Act @@ -239,7 +239,7 @@ uv run pytest -k "test_sentiment" Use Google-style docstrings: ```python -def analyze_sentiment(text: str, model: str = "gpt-4o") -> float: +def analyze_sentiment(text: str, model: str = "gpt-5") -> float: """Analyze sentiment of the given text. Args: diff --git a/docs/development/testing.md b/docs/development/testing.md index fd175e97..d3c5e0b3 100644 --- a/docs/development/testing.md +++ b/docs/development/testing.md @@ -108,7 +108,7 @@ Follow the Arrange-Act-Assert pattern: ```python def test_agent_processes_query_successfully(): # Arrange - Set up test data and dependencies - agent = Agent(name="test_agent", model="gpt-4o") + agent = Agent(name="test_agent", model="gpt-5") query = "What is the current market sentiment?" expected_response_type = QueryResponse @@ -477,7 +477,7 @@ from talos.core.memory import Memory def test_config(): """Test configuration for all tests.""" return { - "model": "gpt-4o", + "model": "gpt-5", "test_mode": True, "api_timeout": 30 } @@ -498,7 +498,7 @@ def mock_api_keys(monkeypatch): @pytest.fixture def test_agent(mock_api_keys): """Create test agent with mocked dependencies.""" - return Agent(name="test_agent", model="gpt-4o") + return Agent(name="test_agent", model="gpt-5") @pytest.fixture def test_memory(temp_directory): diff --git a/examples/proposal_example.py b/examples/proposal_example.py index 12a08423..1e7f1c91 100644 --- a/examples/proposal_example.py +++ b/examples/proposal_example.py @@ -11,7 +11,7 @@ def run_proposal_example(): Runs an example of the agent evaluating a proposal. """ # Initialize the proposals service - service = ProposalsService(llm=ChatOpenAI(model="gpt-4o", openai_api_key=os.environ.get("OPENAI_API_KEY", ""))) + service = ProposalsService(llm=ChatOpenAI(model="gpt-5", openai_api_key=os.environ.get("OPENAI_API_KEY", ""))) # Define the proposal proposal = Proposal( diff --git a/integration_tests/test_memory_integration.py b/integration_tests/test_memory_integration.py index 37efb71c..b75d20a3 100644 --- a/integration_tests/test_memory_integration.py +++ b/integration_tests/test_memory_integration.py @@ -26,7 +26,7 @@ def teardown_method(self): def test_main_agent_memory_tool_registration(self): """Test that MainAgent properly registers memory tools.""" - model = ChatOpenAI(model="gpt-4o", api_key="dummy-key") + model = ChatOpenAI(model="gpt-5", api_key="dummy-key") agent = MainAgent( model=model, @@ -42,7 +42,7 @@ def test_main_agent_memory_tool_registration(self): def test_memory_storage_and_retrieval(self): """Test memory storage and retrieval functionality.""" - model = ChatOpenAI(model="gpt-4o", api_key="dummy-key") + model = ChatOpenAI(model="gpt-5", api_key="dummy-key") agent = MainAgent( model=model, diff --git a/integration_tests/test_memory_prompt_fix.py b/integration_tests/test_memory_prompt_fix.py index b6dfad6a..0341821b 100644 --- a/integration_tests/test_memory_prompt_fix.py +++ b/integration_tests/test_memory_prompt_fix.py @@ -21,7 +21,7 @@ def test_memory_tool_invocation(): try: from langchain_openai import ChatOpenAI - model = ChatOpenAI(model="gpt-4o", api_key="dummy-key") + model = ChatOpenAI(model="gpt-5", api_key="dummy-key") agent = MainAgent( model=model, diff --git a/integration_tests/test_memory_tool_availability.py b/integration_tests/test_memory_tool_availability.py index 8cf6287c..dd1beeb3 100644 --- a/integration_tests/test_memory_tool_availability.py +++ b/integration_tests/test_memory_tool_availability.py @@ -20,7 +20,7 @@ def test_memory_tool_availability(): memory_file = Path(temp_dir) / "test_memory.json" try: - model = ChatOpenAI(model="gpt-4o", api_key="dummy-key") + model = ChatOpenAI(model="gpt-5", api_key="dummy-key") agent = MainAgent( model=model, diff --git a/src/talos/cli/README.md b/src/talos/cli/README.md index 57b1faff..54d9d5dd 100644 --- a/src/talos/cli/README.md +++ b/src/talos/cli/README.md @@ -170,7 +170,7 @@ Run the Talos agent in daemon mode for continuous operation. ```bash uv run talos daemon -uv run talos daemon --model-name gpt-4o --temperature 0.1 +uv run talos daemon --model-name gpt-5 --temperature 0.1 ``` #### `cleanup-users [--older-than] [--dry-run]` diff --git a/src/talos/cli/daemon.py b/src/talos/cli/daemon.py index 08e88bcb..6fbdd27e 100644 --- a/src/talos/cli/daemon.py +++ b/src/talos/cli/daemon.py @@ -16,7 +16,7 @@ class TalosDaemon: - def __init__(self, prompts_dir: str = "src/talos/prompts", model_name: str = "gpt-4", temperature: float = 0.0): + def __init__(self, prompts_dir: str = "src/talos/prompts", model_name: str = "gpt-5", temperature: float = 0.0): self.prompts_dir = prompts_dir self.model_name = model_name self.temperature = temperature diff --git a/src/talos/cli/main.py b/src/talos/cli/main.py index e4d5a485..f37e10db 100644 --- a/src/talos/cli/main.py +++ b/src/talos/cli/main.py @@ -54,7 +54,7 @@ def callback( def main_command( query: Optional[str] = typer.Argument(None, help="The query to send to the agent."), prompts_dir: str = "src/talos/prompts", - model_name: str = "gpt-4o", + model_name: str = "gpt-5", temperature: float = 0.0, verbose: int = typer.Option( 0, "--verbose", "-v", count=True, help="Enable verbose output. Use -v for basic, -vv for detailed." @@ -156,7 +156,7 @@ def decrypt(encrypted_data: str, key_dir: str = ".keys"): @app.command() def daemon( prompts_dir: str = "src/talos/prompts", - model_name: str = "gpt-4o", + model_name: str = "gpt-5", temperature: float = 0.0, ) -> None: """ diff --git a/src/talos/cli/proposals.py b/src/talos/cli/proposals.py index 88d80904..938687b7 100644 --- a/src/talos/cli/proposals.py +++ b/src/talos/cli/proposals.py @@ -10,7 +10,7 @@ @proposals_app.command("eval") def eval_proposal( filepath: str = typer.Option(..., "--file", "-f", help="Path to the proposal file."), - model_name: str = "gpt-4o", + model_name: str = "gpt-5", temperature: float = 0.0, ): """ diff --git a/src/talos/core/memory.py b/src/talos/core/memory.py index 2882fb5e..427244e3 100644 --- a/src/talos/core/memory.py +++ b/src/talos/core/memory.py @@ -103,7 +103,7 @@ def _setup_langmem_sqlite(self): ) self._langmem_manager = create_memory_store_manager( - "gpt-4o", + "gpt-5", namespace=("memories", self.user_id or "default"), store=self._store ) @@ -128,7 +128,7 @@ def _setup_langmem_file(self): return try: - self._langmem_manager = create_memory_manager("gpt-4o") + self._langmem_manager = create_memory_manager("gpt-5") if self.file_path: self.file_path.parent.mkdir(parents=True, exist_ok=True) if not self.file_path.exists(): diff --git a/src/talos/skills/twitter_persona.py b/src/talos/skills/twitter_persona.py index 73996bd5..59a8a9e5 100644 --- a/src/talos/skills/twitter_persona.py +++ b/src/talos/skills/twitter_persona.py @@ -23,7 +23,7 @@ class TwitterPersonaSkill(Skill): model_config = ConfigDict(arbitrary_types_allowed=True) twitter_client: TwitterClient = Field(default_factory=TweepyClient) prompt_manager: PromptManager = Field(default_factory=lambda: FilePromptManager("src/talos/prompts")) - llm: Any = Field(default_factory=lambda: ChatOpenAI(model="gpt-4o")) + llm: Any = Field(default_factory=lambda: ChatOpenAI(model="gpt-5")) @property def name(self) -> str: diff --git a/src/talos/skills/twitter_voice.py b/src/talos/skills/twitter_voice.py index ab13b51b..9dbed029 100644 --- a/src/talos/skills/twitter_voice.py +++ b/src/talos/skills/twitter_voice.py @@ -20,7 +20,7 @@ class TwitterVoiceSkill(Skill): model_config = ConfigDict(arbitrary_types_allowed=True) prompt_manager: PromptManager = Field(default_factory=lambda: FilePromptManager("src/talos/prompts")) - llm: Any = Field(default_factory=lambda: ChatOpenAI(model="gpt-4o")) + llm: Any = Field(default_factory=lambda: ChatOpenAI(model="gpt-5")) twitter_persona_skill: TwitterPersonaSkill | None = Field(default=None) @property diff --git a/tests/test_scheduled_jobs.py b/tests/test_scheduled_jobs.py index a485e5ca..12f482f3 100644 --- a/tests/test_scheduled_jobs.py +++ b/tests/test_scheduled_jobs.py @@ -174,7 +174,7 @@ def main_agent(self): 'OPENAI_API_KEY': 'test_openai_key' }): agent = MainAgent( - model=ChatOpenAI(model="gpt-4o", api_key="test_key"), + model=ChatOpenAI(model="gpt-5", api_key="test_key"), prompts_dir="src/talos/prompts" ) if agent.job_scheduler: @@ -221,7 +221,7 @@ def test_predefined_jobs_registration(self): 'OPENAI_API_KEY': 'test_openai_key' }): agent = MainAgent( - model=ChatOpenAI(model="gpt-4o", api_key="test_key"), + model=ChatOpenAI(model="gpt-5", api_key="test_key"), prompts_dir="src/talos/prompts", scheduled_jobs=[job] )