Document optional API key environment behavior
This commit is contained in:
15
types.go
15
types.go
@@ -322,7 +322,10 @@ type ExecutionTarget struct {
|
||||
// ReasoningEffort is the effective opaque provider-specific reasoning
|
||||
// setting. An empty value instructs model clients to omit reasoning.
|
||||
ReasoningEffort string `json:"reasoning_effort"`
|
||||
// APIKeyEnv is an environment-variable name, not its credential value.
|
||||
// APIKeyEnv is the resolved name of an optional environment lookup source,
|
||||
// not its credential value. The built-in client omits Authorization when no
|
||||
// usable direct or environment credential is available; injected clients may
|
||||
// resolve this metadata differently.
|
||||
APIKeyEnv string `json:"api_key_env"`
|
||||
// ExtraParams contains copied JSON-compatible provider parameters.
|
||||
ExtraParams map[string]any `json:"extra_params"`
|
||||
@@ -426,9 +429,10 @@ type ExecutionTargetOverride struct {
|
||||
// inherited value and disables reasoning for this run. Non-blank values
|
||||
// are opaque and are not validated against a fixed vocabulary.
|
||||
ReasoningEffort *string
|
||||
// APIKeyEnv replaces the profile or backend environment-variable name when
|
||||
// non-blank. A direct RunRequest.APIKey still takes precedence over
|
||||
// environment lookup.
|
||||
// APIKeyEnv replaces the profile or backend optional environment lookup
|
||||
// source when non-blank. A direct RunRequest.APIKey still takes precedence.
|
||||
// The built-in client omits Authorization when neither source has a usable
|
||||
// value; injected clients may resolve this metadata differently.
|
||||
APIKeyEnv string
|
||||
// ExtraParams, when non-empty, replaces the complete profile or backend map.
|
||||
// Values must be JSON-compatible: nil, booleans, finite numbers, strings,
|
||||
@@ -481,7 +485,8 @@ type Profile struct {
|
||||
ReasoningEffort string
|
||||
// APIKeyRequired clears a backend's inherited API-key environment name and
|
||||
// requires a non-blank RunRequest.APIKey unless the request explicitly
|
||||
// supplies ExecutionTargetOverride.APIKeyEnv. It does not store a credential.
|
||||
// supplies ExecutionTargetOverride.APIKeyEnv. When false, a named
|
||||
// environment source remains optional. It does not store a credential.
|
||||
APIKeyRequired bool
|
||||
// ExtraParams contains provider-specific JSON-compatible values. An empty
|
||||
// map inherits backend request defaults, when any. WithProfiles validates
|
||||
|
||||
Reference in New Issue
Block a user