Prefer Ollama configured model context length over model architecture context length (#53543)

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Fixes calculation of Ollama model context length. Now prefers num_ctx
model configuration over model architecture context length the same way
Ollama does.

Closes #42340

Release Notes:

- Fix calculation of Ollama model context length
1a6c2aeeefMarekMalevic committed on 4/15/2026, 6:21:56 AM· committed by GitHubparenta30bc61
1 file changedLine totals unavailable