SIM_MODEL override + optional HTTP request/response logging (log-http)#447
Open
jland-redhat wants to merge 4 commits intollm-d:mainfrom
Open
SIM_MODEL override + optional HTTP request/response logging (log-http)#447jland-redhat wants to merge 4 commits intollm-d:mainfrom
jland-redhat wants to merge 4 commits intollm-d:mainfrom
Conversation
Collaborator
|
@jland-redhat Thanks a lot for the PR. Could you please split this into two separate PRs, since it introduces two distinct features? That will make it easier to review and track. Regarding the This ordering should address the issue you’re tackling. We also have an existing environment variable, Please also add a short explanation of the precedence order to the The HTTP logging part looks fine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds two operational knobs for deployments and debugging.
SIM_MODEL — If this environment variable is non-empty, it overrides the configured/CLI model after the config file and flags are applied. That makes it easier to point the same image or manifest at different model names (for example in Kubernetes) without editing command-line arguments or regenerating config.
log-http / --log-http — When enabled, logs each HTTP request and response at INFO: method, URI, remote address, headers, and body when it is buffered in memory. Bodies are truncated after 512 KiB. Streamed responses (for example SSE) log status and headers only, not the stream body. Documented in docs/configuration.md with a warning that logs may include sensitive data such as Authorization headers, so this should be used only in trusted environments.
Tests — Ginkgo tests cover SIM_MODEL overriding --model, overriding a value from a config file, and leaving the model unchanged when the variable is unset.