fix: enable_session_persistence in AgentConfig should be optional (#1012)

# What does this PR do?
This issue was discovered in
https://github.com/meta-llama/llama-stack/pull/1009#discussion_r1947036518.

## Test Plan

This field is no longer required after the change.

[//]: # (## Documentation)
[//]: # (- [ ] Added a Changelog entry if the change is significant)

---------

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
Co-authored-by: Ashwin Bharambe <ashwin.bharambe@gmail.com>
This commit is contained in:
Yuan Tang 2025-02-14 12:19:53 -05:00 committed by GitHub
parent 314ee09ae3
commit 64328bfe62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -2724,7 +2724,8 @@
"type": "string"
},
"enable_session_persistence": {
"type": "boolean"
"type": "boolean",
"default": false
},
"response_format": {
"$ref": "#/components/schemas/ResponseFormat"
@ -2733,8 +2734,7 @@
"additionalProperties": false,
"required": [
"model",
"instructions",
"enable_session_persistence"
"instructions"
]
},
"AgentTool": {

View file

@ -1660,13 +1660,13 @@ components:
type: string
enable_session_persistence:
type: boolean
default: false
response_format:
$ref: '#/components/schemas/ResponseFormat'
additionalProperties: false
required:
- model
- instructions
- enable_session_persistence
AgentTool:
oneOf:
- type: string

View file

@ -179,7 +179,7 @@ class AgentConfigCommon(BaseModel):
class AgentConfig(AgentConfigCommon):
model: str
instructions: str
enable_session_persistence: bool
enable_session_persistence: Optional[bool] = False
response_format: Optional[ResponseFormat] = None