Helpers for managing the anthropic-beta request header.
Anthropic accepts one or more beta opt-ins as a comma-separated list. This module normalizes the various shapes (string, list, nil) into a deduped list and into the comma-joined header value.
Summary
Functions
Ensure one or more beta values are present on a keyword list of client options, merging with anything already there. Used by resource modules that gate on a specific beta header (files, managed agents, advisor).
Render a list of beta values as the comma-joined header value, or nil if empty.
Merge any number of beta values into a single deduped list, preserving the order of first appearance.
Normalize a single value into a list of beta strings.
Types
Functions
Ensure one or more beta values are present on a keyword list of client options, merging with anything already there. Used by resource modules that gate on a specific beta header (files, managed agents, advisor).
Render a list of beta values as the comma-joined header value, or nil if empty.
Merge any number of beta values into a single deduped list, preserving the order of first appearance.
Normalize a single value into a list of beta strings.