diff --git a/agentplatform/_genai/evals.py b/agentplatform/_genai/evals.py index 56a6cad82e..67405c5bbc 100644 --- a/agentplatform/_genai/evals.py +++ b/agentplatform/_genai/evals.py @@ -3070,7 +3070,7 @@ def run_inference( events are replayed as session history for local ADK agents. model: Optional type is experimental and may change in future versions. The model to use for inference, optional for agent evaluations. - - For Google Gemini models, provide the model name string (e.g., "gemini-2.5-flash"). + - For Google Gemini models, provide the model name string (e.g., "gemini-flash-latest"). - For third-party models via LiteLLM, use the format "provider/model_name" (e.g., "openai/gpt-4o"). Ensure the necessary API key (e.g., OPENAI_API_KEY) is set as an environment variable. @@ -3342,7 +3342,7 @@ def generate_rubrics( with the content. generator_model_config: Optional. Configuration for the model used in custom rubric generation. Only used if `prompt_template` is provided. - e.g., {"autorater_model": "gemini-2.5-flash"}. + e.g., {"autorater_model": "gemini-flash-latest"}. rubric_content_type: Optional. The type of rubric content to be generated. Only used if `prompt_template` is provided. rubric_type_ontology: Optional. A pre-defined list of allowed types @@ -3619,12 +3619,12 @@ def create_evaluation_run( If provided, `agent_info` must be None. If omitted and `agent_info` is provided, this will be automatically constructed using `agent_info` and `user_simulator_config`. The `model` field of an inference config accepts a short Gemini model - name (e.g. `gemini-2.5-flash`), which is automatically expanded to a + name (e.g. `gemini-flash-latest`), which is automatically expanded to a fully-qualified resource name using the client's project and location, or an already fully-qualified publisher-model or endpoint resource name. Example: - {"candidate-1": types.EvaluationRunInferenceConfig(model="gemini-2.5-flash")} + {"candidate-1": types.EvaluationRunInferenceConfig(model="gemini-flash-latest")} labels: The labels to apply to the evaluation run. loss_analysis_metrics: This field is experimental and may change in future versions. Optional list of metrics to run loss analysis on. The @@ -6261,12 +6261,12 @@ async def create_evaluation_run( If provided, `agent_info` must be None. If omitted and `agent_info` is provided, this will be automatically constructed using `agent_info` and `user_simulator_config`. The `model` field of an inference config accepts a short Gemini model - name (e.g. `gemini-2.5-flash`), which is automatically expanded to a + name (e.g. `gemini-flash-latest`), which is automatically expanded to a fully-qualified resource name using the client's project and location, or an already fully-qualified publisher-model or endpoint resource name. Example: - {"candidate-1": types.EvaluationRunInferenceConfig(model="gemini-2.5-flash")} + {"candidate-1": types.EvaluationRunInferenceConfig(model="gemini-flash-latest")} red_teaming_config: This field is experimental and may change in future versions. Optional configuration for automated Agent Red Teaming analysis. Specifies attack categories and vulnerable tools to diff --git a/agentplatform/_genai/types/common.py b/agentplatform/_genai/types/common.py index 56efc40a53..34eec20ffd 100644 --- a/agentplatform/_genai/types/common.py +++ b/agentplatform/_genai/types/common.py @@ -2238,7 +2238,7 @@ class EvaluationRunInferenceConfig(_common.BaseModel): ) model: Optional[str] = Field( default=None, - description="""The model to use for inference. Accepts a short Gemini model name (e.g. `gemini-2.5-flash`), which is automatically expanded to a fully-qualified resource name using the client's project and location, or an already fully-qualified publisher-model or endpoint resource name (e.g. `projects/{project}/locations/{location}/publishers/google/models/gemini-2.5-flash`).""", + description="""The model to use for inference. Accepts a short Gemini model name (e.g. `gemini-flash-latest`), which is automatically expanded to a fully-qualified resource name using the client's project and location, or an already fully-qualified publisher-model or endpoint resource name (e.g. `projects/{project}/locations/{location}/publishers/google/models/gemini-flash-latest`).""", ) prompt_template: Optional[EvaluationRunPromptTemplate] = Field( default=None, description="""The prompt template used for inference.""" @@ -2260,7 +2260,7 @@ class EvaluationRunInferenceConfigDict(TypedDict, total=False): """The agent config.""" model: Optional[str] - """The model to use for inference. Accepts a short Gemini model name (e.g. `gemini-2.5-flash`), which is automatically expanded to a fully-qualified resource name using the client's project and location, or an already fully-qualified publisher-model or endpoint resource name (e.g. `projects/{project}/locations/{location}/publishers/google/models/gemini-2.5-flash`).""" + """The model to use for inference. Accepts a short Gemini model name (e.g. `gemini-flash-latest`), which is automatically expanded to a fully-qualified resource name using the client's project and location, or an already fully-qualified publisher-model or endpoint resource name (e.g. `projects/{project}/locations/{location}/publishers/google/models/gemini-flash-latest`).""" prompt_template: Optional[EvaluationRunPromptTemplateDict] """The prompt template used for inference.""" @@ -31000,7 +31000,7 @@ def assemble_contents(self) -> list[genai_types.Content]: my_prompt = types.Prompt( prompt_data=types.PromptData( - model="gemini-2.0-flash-001", + model="gemini-flash-latest", contents=[ genai_types.Content( parts=[