contributing/providers.md
Provider options schemas are user facing.
We want them to be as restrictive as possible, so that we have more flexibility with future changes and allow for meaningful null values.
.optional() unless null is meaningfulResponse schemas need to be flexible enough to deal with provider API changes that do not affect our processing to prevent unnecessary breakages.
.nullish() instead of .optional()Types and Zod schemas for the provider specific model options follow the pattern {Provider}{ModelType}Options, e.g. AnthropicLanguageModelOptions.
If a provider has multiple implementations for the same model type, add a qualifier: {Provider}{ModelType}{Qualifier}Options, e.g. OpenAILanguageModelChatOptions and OpenAILanguageModelResponsesOptions.
openaiLanguageModelChatOptions)For the Provider v3 interface, we require fully specified names with a "Model" suffix, e.g. languageModel(id) or imageModel(id). These help with clarity for both developers and agents.