Skip to content

Commit ccb30e3

Browse files
author
Factory Bot
committed
refactor: migrate to 100% Cortex backend (remove multi-provider support)
- Delete old provider files: backend.rs, openai.rs, openai_compatible.rs - Replace client/mod.rs with simplified Cortex-only version - Update cortex.rs with tool calling support from cortex-app - Preserve validate_auth() method from cortex-cli improvements - Update imports to use new client module structure
1 parent b62aa00 commit ccb30e3

7 files changed

Lines changed: 335 additions & 1790 deletions

File tree

cortex-engine/src/agent/generator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! what they want an agent to do, and the system will generate an appropriate
66
//! agent configuration with system prompt, tool permissions, and metadata.
77
8-
use crate::client::{CompletionRequest, Message, create_backend_client};
8+
use crate::client::{CompletionRequest, Message, create_client};
99
use crate::error::{CortexError, Result};
1010
use serde::{Deserialize, Serialize};
1111

@@ -229,7 +229,7 @@ impl AgentGenerator {
229229

230230
/// Generate an agent configuration from a natural language description.
231231
pub async fn generate(&self, description: &str) -> Result<GeneratedAgent> {
232-
let client = create_backend_client(&self.model, self.backend_url.as_deref());
232+
let client = create_client("cortex", &self.model, "", self.backend_url.as_deref())?;
233233

234234
let request = CompletionRequest {
235235
messages: vec![

0 commit comments

Comments
 (0)