mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-27 18:50:41 +00:00
Add X-LlamaStack-Client-Version, rename ProviderData -> Provider-Data (#735)
Add another header so client SDKs can identify their versions which can be used for immediate detection of possible compatibility issues. A semver mismatch against the wrong server should be immediately flagged and requests should be denied. Also change `X-LlamaStack-ProviderData` to `X-LlamaStack-Provider-Data` since that hyphenation is better.
This commit is contained in:
parent
a5c57cd381
commit
ffc6bd4805
13 changed files with 1281 additions and 152 deletions
|
@ -486,13 +486,22 @@ class Generator:
|
|||
parameters = path_parameters + query_parameters
|
||||
parameters += [
|
||||
Parameter(
|
||||
name="X-LlamaStack-ProviderData",
|
||||
name="X-LlamaStack-Provider-Data",
|
||||
in_=ParameterLocation.Header,
|
||||
description="JSON-encoded provider data which will be made available to the adapter servicing the API",
|
||||
required=False,
|
||||
schema=self.schema_builder.classdef_to_ref(str),
|
||||
)
|
||||
]
|
||||
parameters += [
|
||||
Parameter(
|
||||
name="X-LlamaStack-Client-Version",
|
||||
in_=ParameterLocation.Header,
|
||||
description="Version of the client making the request. This is used to ensure that the client and server are compatible.",
|
||||
required=False,
|
||||
schema=self.schema_builder.classdef_to_ref(str),
|
||||
)
|
||||
]
|
||||
|
||||
# data passed in payload
|
||||
if op.request_params:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue