Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changing schema naming #100

Merged
merged 23 commits into from
Jan 18, 2025

Conversation

alexagriffith
Copy link
Contributor

@alexagriffith alexagriffith commented Jan 15, 2025

#89

changing all instances of inputSchema and outputSchema to schema for simplicity.
once that was done, the yaml file had a nested structure of schema.schema - schema can have two properties in it, schema and version. this is a bit redundant so schema.schema was changed to schema.name since the value is the name of the schema for a given versioned schema struct

@alexagriffith alexagriffith requested a review from a team as a code owner January 15, 2025 16:58
@alexagriffith alexagriffith force-pushed the agriffith/rename-schema-props branch 2 times, most recently from 69d82c8 to bf0151d Compare January 15, 2025 17:30
alexagriffith and others added 3 commits January 15, 2025 12:46
Signed-off-by: Alexa Griffith <[email protected]>
Signed-off-by: Alexa Griffith <[email protected]>
Signed-off-by: Alexa Griffith <[email protected]>
@alexagriffith alexagriffith force-pushed the agriffith/rename-schema-props branch from a297206 to d8b94d0 Compare January 15, 2025 17:46
Signed-off-by: Alexa Griffith <[email protected]>
@mathetake
Copy link
Member

Could you keep the PR draft until all CI happy?

@alexagriffith alexagriffith marked this pull request as draft January 15, 2025 21:18
.gitignore Outdated Show resolved Hide resolved
@alexagriffith alexagriffith force-pushed the agriffith/rename-schema-props branch 2 times, most recently from 9ba2a3a to 068ce0e Compare January 15, 2025 22:56
Signed-off-by: Alexa Griffith <[email protected]>

change nested schema to name in structs

Signed-off-by: Alexa Griffith <[email protected]>

fix factory logic

Signed-off-by: Alexa Griffith <[email protected]>

rebase# This is a combination of 20 commits.

fix some other schema names to be consistent

Signed-off-by: Alexa Griffith <[email protected]>

gitignore idea

Signed-off-by: Alexa Griffith <[email protected]>

fix missing name change

Signed-off-by: Alexa Griffith <[email protected]>

fix filterconfig

Signed-off-by: Alexa Griffith <[email protected]>

fix test

Signed-off-by: Alexa Griffith <[email protected]>

renaming

Signed-off-by: Alexa Griffith <[email protected]>

fix

Signed-off-by: Alexa Griffith <[email protected]>

fix sink test naming

Signed-off-by: Alexa Griffith <[email protected]>

fix controller test

Signed-off-by: Alexa Griffith <[email protected]>

add name rule

Signed-off-by: Alexa Griffith <[email protected]>

fix rule

Signed-off-by: Alexa Griffith <[email protected]>

rename klog pkg

Signed-off-by: Alexa Griffith <[email protected]>

fix cel tests

Signed-off-by: Alexa Griffith <[email protected]>

re-add openai pkg

Signed-off-by: Alexa Griffith <[email protected]>

fix llm backend yaml

Signed-off-by: Alexa Griffith <[email protected]>

fix backend

Signed-off-by: Alexa Griffith <[email protected]>

fix the code style

Signed-off-by: Alexa Griffith <[email protected]>

fix order

Signed-off-by: Alexa Griffith <[email protected]>

fix

Signed-off-by: Alexa Griffith <[email protected]>

lint

Signed-off-by: Alexa Griffith <[email protected]>
@alexagriffith alexagriffith force-pushed the agriffith/rename-schema-props branch from 068ce0e to 2e997d4 Compare January 15, 2025 22:57
@alexagriffith alexagriffith marked this pull request as ready for review January 15, 2025 23:00
// InputSchema is a required field
InputSchema *ToolInputSchema `json:"inputSchema"`
// Schema is a required field
Schema *ToolSchema `json:"schema"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be changed, it is the AWS bedrock schema

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

offline discussion - fixed this. didn't realize this was a field required by aws and that their are issues using their api for these types.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: I think we should have a test for if our hard coded fields and theirs misalign

Signed-off-by: Alexa Griffith <[email protected]>
mathetake added a commit that referenced this pull request Jan 16, 2025
Signed-off-by: Takeshi Yoneda <[email protected]>
// APISchema corresponds to APISchema in api/v1alpha1/api.go.
type APISchema string
// APISchemaName corresponds to APISchemaName in api/v1alpha1/api.go.
type APISchemaName string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that the values are provider names, wouldn't APISchemaProviderName be more suitable than APISchemaName?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont have a big preference, open for discussion on this

Signed-off-by: Alexa Griffith <[email protected]>
@yuzisun
Copy link
Contributor

yuzisun commented Jan 16, 2025

@alexagriffith need to rebase your PR

Signed-off-by: Alexa Griffith <[email protected]>
Signed-off-by: Alexa Griffith <[email protected]>
Signed-off-by: Alexa Griffith <[email protected]>
Signed-off-by: Alexa Griffith <[email protected]>
Signed-off-by: Alexa Griffith <[email protected]>
Signed-off-by: Alexa Griffith <[email protected]>
Signed-off-by: Alexa Griffith <[email protected]>
Signed-off-by: Alexa Griffith <[email protected]>
@alexagriffith alexagriffith force-pushed the agriffith/rename-schema-props branch from 309fb40 to 2215b9f Compare January 17, 2025 19:26
Signed-off-by: Alexa Griffith <[email protected]>
Signed-off-by: Alexa Griffith <[email protected]>
schema: OpenAI
selectedBackendHeaderKey: x-envoy-ai-gateway-selected-backend
modelNameHeaderKey: x-model-name
rules:
- backends:
- name: kserve
weight: 1
outputSchema:
schema:
schema: OpenAI
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to update to name now

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonder why the CI did not complain

schema: OpenAI
- name: awsbedrock
weight: 10
outputSchema:
schema:
schema: AWSBedrock
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

schema: AWSBedrock
headers:
- name: x-model-name
value: llama3.3333
- backends:
- name: openai
outputSchema:
schema:
schema: OpenAI
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

.gitignore Outdated Show resolved Hide resolved
Signed-off-by: Dan Sun <[email protected]>
@yuzisun yuzisun merged commit 69a7580 into envoyproxy:main Jan 18, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants