Update OpenAI-compatible auth docs
This commit is contained in:
@@ -122,7 +122,12 @@ Structured output is currently `json_schema` only, serialized as:
|
||||
|
||||
## Authentication Header
|
||||
|
||||
If `Target.APIKeyEnv` is set:
|
||||
If `Target.APIKey` is set:
|
||||
|
||||
- set `Authorization: Bearer <value>`
|
||||
- do not read `Target.APIKeyEnv`
|
||||
|
||||
If `Target.APIKey` is empty and `Target.APIKeyEnv` is set:
|
||||
|
||||
- resolve environment variable value at request time
|
||||
- set `Authorization: Bearer <value>`
|
||||
@@ -131,7 +136,7 @@ If the environment variable is unset/empty:
|
||||
|
||||
- request fails before HTTP call (`ErrInvalidRequest`)
|
||||
|
||||
If `Target.APIKeyEnv` is empty:
|
||||
If both `Target.APIKey` and `Target.APIKeyEnv` are empty:
|
||||
|
||||
- no `Authorization` header is sent
|
||||
|
||||
|
||||
Reference in New Issue
Block a user