Skip to content

Commit b5a28b7

Browse files
ssbushipavelgj
andauthored
fix(genkit-tools/generate): Make model optional (#3918)
Co-authored-by: Pavel Jbanov <pavelgj@gmail.com>
1 parent eb79656 commit b5a28b7

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

genkit-tools/common/src/types/model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ export const GenerateActionOutputConfig = z.object({
372372

373373
export const GenerateActionOptionsSchema = z.object({
374374
/** A model name (e.g. `vertexai/gemini-1.0-pro`). */
375-
model: z.string(),
375+
model: z.string().optional(),
376376
/** Retrieved documents to be used as context for this generation. */
377377
docs: z.array(DocumentDataSchema).optional(),
378378
/** Conversation history for multi-turn prompting when supported by the underlying model. */

genkit-tools/genkit-schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,6 @@
469469
}
470470
},
471471
"required": [
472-
"model",
473472
"messages"
474473
],
475474
"additionalProperties": false

py/packages/genkit/src/genkit/core/typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ class GenerateActionOptions(BaseModel):
951951
"""Model for generateactionoptions data."""
952952

953953
model_config = ConfigDict(extra='forbid', populate_by_name=True)
954-
model: str
954+
model: str | None = None
955955
docs: list[DocumentData] | None = None
956956
messages: list[Message]
957957
tools: list[str] | None = None

0 commit comments

Comments
 (0)