Document provider support for context length via models endpoint and caching strategy for model metadata