Skip to content

[DOCS] Document community context-window fallback from models.dev #448

Closed

Description

Summary

The gateway now resolves model context windows from the community models.dev table (inference-gateway/inference-gateway#472, issue inference-gateway/inference-gateway#471), as a sibling of the community pricing fallback from inference-gateway/inference-gateway#470. The community-metadata documentation should cover it:

  • GET /v1/models?include=context_window now falls back to community values with "source": "community" when neither the upstream provider listing nor a runtime lookup resolves a window; provider and runtime values keep precedence
  • The table is synced from the models.dev [limit] section via task contextwindow:sync into providers/core/community_context_windows.json (separate from pricing:sync and community_pricing.json)
  • Models absent from the community table (local runtimes by design) still render an explicit null
  • Caveat worth documenting: models.dev limits can be conservative or tier-specific (e.g. nvidia free-tier models listed below the model's native window), which is why provider-reported values win

Affected pages: the community-metadata page introduced for the #470 pricing fallback, plus any /v1/models reference listing the context_window.source values (now runtime, provider, community).

Acceptance Criteria

  • Community-metadata page documents the context-window fallback and its sync task alongside pricing
  • context_window.source value list includes community with precedence explained (runtime > provider > community)
  • Explicit-null behavior for models absent from the table is documented

Activity

  1. added
    documentation
    on Jul 20, 2026
  2. added theissue type on Jul 20, 2026
  3. edenreich commented on Jul 20, 2026

    @edenreich
    Contributor

    @claude Can you check if this needs to be documented? if not already documented use /ponytail:ponytail

  4. inference-gateway-maintainer commented on Jul 20, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Claude finished @edenreich's task in 2m 0s —— View job • docs/issue-448-20260720-2044 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-448-20260720-2044?quick_pull=1&title=Issue%20%23448%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23448%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Documented the community context-window fallback

    • Check whether the context-window community fallback is already documented
    • Document community source in the context_window resolution order (api-reference.md)
    • Lint/format check and commit
    • Open PR and move the roadmap item to QA

    Finding: it was not yet documented. api-reference.md covered the community fallback for pricing (#449), but the context_window resolution order still listed only runtime, provider, null, and the Model schema table only listed "runtime" / "provider" as source values.

    Changes (kept minimal, in api-reference.md where the pricing fallback already lives - no new page needed):

    • Added step 3 community to the resolution order: synced from the models.dev [limit] section via task contextwindow:sync (separate from task pricing:sync), with the caveat that community limits can be conservative or tier-specific, which is why runtime and provider values take precedence.
    • Extended the null step: local providers (ollama, llamacpp) are intentionally absent from the community table and return an explicit null unless the runtime reports a window.
    • Updated the Model schema table's context_window row to list "runtime", "provider", "community" and the four-step resolution order.

    lint:md and format:check pass. Skipped a dedicated community-metadata page - both fallbacks are two short lists in api-reference.md; split them out only if the community-metadata story outgrows that section.

    PR: #450

  5. moved this from In progress to QA in 2026on Jul 20, 2026
  6. moved this from QA to Done in 2026on Jul 20, 2026
  7. inference-gateway-releaser commented on Jul 22, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.3 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions