mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-03 20:30:41 +08:00
Support multiple model types for different reasoning tasks
This commit is contained in:
@ -30,12 +30,13 @@ from pr_agent.config_loader import get_settings, global_settings
|
||||
from pr_agent.log import get_logger
|
||||
|
||||
|
||||
def get_weak_model() -> str:
|
||||
if get_settings().get("config.model_weak"):
|
||||
def get_model(model_type: str = "model_weak") -> str:
|
||||
if model_type == "model_weak" and get_settings().get("config.model_weak"):
|
||||
return get_settings().config.model_weak
|
||||
elif model_type == "model_reasoning" and get_settings().get("config.model_reasoning"):
|
||||
return get_settings().config.model_reasoning
|
||||
return get_settings().config.model
|
||||
|
||||
|
||||
class Range(BaseModel):
|
||||
line_start: int # should be 0-indexed
|
||||
line_end: int
|
||||
@ -45,6 +46,7 @@ class Range(BaseModel):
|
||||
class ModelType(str, Enum):
|
||||
REGULAR = "regular"
|
||||
WEAK = "weak"
|
||||
REASONING = "reasoning"
|
||||
|
||||
class PRReviewHeader(str, Enum):
|
||||
REGULAR = "## PR Reviewer Guide"
|
||||
|
Reference in New Issue
Block a user