Skip to content

[DOCS] Go SDK: document include=context_window on ListModels / ListProviderModels #451

Closed

Description

Summary

The Go SDK now supports requesting per-model metadata via the gateway's include query parameter. ListModels and ListProviderModels accept optional variadic include values (sdk.ContextWindow, sdk.Pricing), forwarded as ?include=context_window,pricing. When requested, Model.ContextWindow is populated (nil when not requested; explicit null from the gateway when requested but unresolved).

Implemented in inference-gateway/sdk#133 (issue inference-gateway/sdk#132).

Affected pages: Go SDK reference / model listing examples.

Acceptance Criteria

  • Go SDK docs show ListModels(ctx, sdk.ContextWindow) and ListProviderModels(ctx, provider, sdk.ContextWindow) usage
  • Behavior of Model.ContextWindow (absent vs null vs populated) is explained
  • Example output snippet included

Activity

  1. added
    documentation
    on Jul 20, 2026
  2. moved this to Todo in 2026on Jul 21, 2026
  3. added theissue type on Jul 21, 2026
  4. edenreich commented on Jul 21, 2026

    @edenreich
    Contributor

    @infer Can you work on this? use /ponytail:ponytail

  5. inference-gateway-maintainer commented on Jul 21, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Model: ollama_cloud/deepseek-v4-flash · View Job

    Todos

    • Read ponytail skill instructions
    • Add issue to project board and set Status=In progress
    • Read existing Go SDK docs to understand current structure
    • Check the Go SDK source for the actual API signatures
    • Create working branch
    • Update Go SDK docs with include=context_window usage
    • Run validation checks (lint:md, format:check, build)
    • Commit and push changes
    • Create draft PR
    • Set project board Status=QA

    Pull Request

    #452

    ✅ Infer Result: Success

    All work is complete - PR #452 is ready for review, the project board is at QA, and all validation checks pass.

    Model: ollama_cloud/deepseek-v4-flash · Exit Code: 0 · Duration: 4m 16s

    Tokens: 3,595,461 in · 10,381 out · 3,605,842 total (45 requests)

    Tool calls: 52 total · 94% success rate

    Traces
    Session: 1784598186-3f1b9d05
    
    session (standard, success)                 4m15s
    ├── chat ollama_cloud/deepseek-v4-flash     27.5s
    ├── execute_tool TodoWrite call_gunlrri2    361µs
    ├── chat ollama_cloud/deepseek-v4-flash      2.0s
    ├── execute_tool Read call_yd1801vj           1ms
    ├── execute_tool Read call_g6qx4q3y         250µs
    ├── execute_tool Read call_tljcjam3         547µs [error: tool_error]
    ├── chat ollama_cloud/deepseek-v4-flash      2.4s
    ├── execute_tool Tree call_n8ttborg           3ms
    ├── chat ollama_cloud/deepseek-v4-flash      1.9s
    ├── execute_tool Bash call_a4dhmwsc           4ms
    ├── chat ollama_cloud/deepseek-v4-flash      1.5s
    ├── execute_tool Read call_10h1ne8i         824µs
    ├── chat ollama_cloud/deepseek-v4-flash      4.0s
    ├── execute_tool TodoWrite call_2o4z7baf     75µs
    ├── chat ollama_cloud/deepseek-v4-flash      2.1s
    ├── execute_tool Bash call_6umdnag7         326ms
    ├── chat ollama_cloud/deepseek-v4-flash      1.9s
    ├── execute_tool Bash call_871wuxqe          1.1s
    ├── chat ollama_cloud/deepseek-v4-flash      3.1s
    ├── execute_tool Bash call_q7bv2393         22.7s
    ├── chat ollama_cloud/deepseek-v4-flash      2.2s
    ├── execute_tool Bash call_87y8tpwk         571ms
    ├── chat ollama_cloud/deepseek-v4-flash      3.5s
    ├── chat ollama_cloud/deepseek-v4-flash      2.7s
    ├── chat ollama_cloud/deepseek-v4-flash      1.9s
    ├── execute_tool Bash call_af0ihy7o         323ms
    ├── chat ollama_cloud/deepseek-v4-flash      2.5s
    ├── execute_tool Bash call_sril5pih         248ms
    ├── chat ollama_cloud/deepseek-v4-flash      1.8s
    ├── execute_tool Bash call_xi04n5at         321ms
    ├── chat ollama_cloud/deepseek-v4-flash      2.5s
    ├── chat ollama_cloud/deepseek-v4-flash      4.3s
    ├── chat ollama_cloud/deepseek-v4-flash      2.2s
    ├── chat ollama_cloud/deepseek-v4-flash      9.5s
    ├── execute_tool Bash call_jri44of3         374ms
    ├── execute_tool Bash call_1talhape         352ms
    ├── chat ollama_cloud/deepseek-v4-flash      2.4s
    ├── execute_tool Bash call_2e8j61o1          34ms [error: tool_error]
    ├── chat ollama_cloud/deepseek-v4-flash      2.6s
    ├── execute_tool Bash call_7s4mp7e0         345ms
    ├── chat ollama_cloud/deepseek-v4-flash      1.8s
    ├── execute_tool Bash call_yg6vf72z          36ms [error: tool_error]
    ├── chat ollama_cloud/deepseek-v4-flash      2.2s
    ├── chat ollama_cloud/deepseek-v4-flash      2.6s
    ├── execute_tool Bash call_i681sobc         303ms
    ├── chat ollama_cloud/deepseek-v4-flash      4.5s
    ├── execute_tool TodoWrite call_ogndyqus     87µs
    ├── chat ollama_cloud/deepseek-v4-flash      1.9s
    ├── execute_tool Bash call_a1y682qh          57ms
    ├── chat ollama_cloud/deepseek-v4-flash      2.5s
    ├── execute_tool Bash call_x310tj0q          1.2s
    ├── chat ollama_cloud/deepseek-v4-flash      6.4s
    ├── execute_tool TodoWrite call_38dk2yob     74µs
    ├── chat ollama_cloud/deepseek-v4-flash      2.8s
    ├── execute_tool Read call_6dzpmzua         228µs
    ├── chat ollama_cloud/deepseek-v4-flash      6.1s
    ├── execute_tool Edit call_ktnhwll2           2ms
    ├── chat ollama_cloud/deepseek-v4-flash      4.8s
    ├── execute_tool TodoWrite call_vujz8oud     98µs
    ├── chat ollama_cloud/deepseek-v4-flash      2.9s
    ├── execute_tool Bash call_thoolzpi          1.9s
    ├── execute_tool Bash call_tdtj64ex          4.0s
    ├── chat ollama_cloud/deepseek-v4-flash      2.0s
    ├── execute_tool Bash call_zumm9dv7         20.8s
    ├── chat ollama_cloud/deepseek-v4-flash      2.1s
    ├── execute_tool Bash call_2wp31qph           7ms
    ├── chat ollama_cloud/deepseek-v4-flash     40.8s
    ├── execute_tool Bash call_shepn4tg          10ms
    ├── chat ollama_cloud/deepseek-v4-flash      2.0s
    ├── execute_tool Bash call_r1zacgy3          1.0s
    ├── chat ollama_cloud/deepseek-v4-flash      4.8s
    ├── execute_tool TodoWrite call_emb5y17y     85µs
    ├── chat ollama_cloud/deepseek-v4-flash      3.0s
    ├── execute_tool Write call_vx1c9xtr        686µs
    ├── chat ollama_cloud/deepseek-v4-flash      3.1s
    ├── execute_tool Bash call_hdiatxzq          1.8s
    ├── chat ollama_cloud/deepseek-v4-flash      3.2s
    ├── execute_tool Bash call_etdeyeok         796ms
    ├── chat ollama_cloud/deepseek-v4-flash      2.6s
    ├── execute_tool Bash call_ecltpwvq         289ms
    ├── execute_tool Bash call_0r7xpsao           6ms
    ├── execute_tool Bash call_u5ctypw5           6ms
    ├── chat ollama_cloud/deepseek-v4-flash      2.6s
    ├── execute_tool TodoWrite call_7axeuser     74µs
    ├── chat ollama_cloud/deepseek-v4-flash      2.0s
    ├── execute_tool Bash call_4ftny4cs         833ms
    ├── chat ollama_cloud/deepseek-v4-flash      2.3s
    ╰── chat ollama_cloud/deepseek-v4-flash      2.4s
    
    Stats
    Tool Calls
    
    ╭───────────┬───────┬───────┬────────╮
    │ Tool      │ Calls │ Fail% │ Avg    │
    ├───────────┼───────┼───────┼────────┤
    │ Bash      │ 28    │ 7%    │ 2136ms │
    │ TodoWrite │ 7     │ 0%    │ 0ms    │
    │ Read      │ 5     │ 20%   │ 0ms    │
    │ Write     │ 1     │ 0%    │ 0ms    │
    │ Tree      │ 1     │ 0%    │ 3ms    │
    │ Edit      │ 1     │ 0%    │ 2ms    │
    ╰───────────┴───────┴───────┴────────╯
    
    Token Usage
    
    ╭────────────────────────────────┬─────────┬────────┬────────────┬─────────┬──────╮
    │ Model                          │ Prompt  │ Cached │ Completion │ Total   │ Cost │
    ├────────────────────────────────┼─────────┼────────┼────────────┼─────────┼──────┤
    │ ollama_cloud/deepseek-v4-flash │ 3595461 │ 0      │ 10381      │ 3605842 │ -    │
    ╰────────────────────────────────┴─────────┴────────┴────────────┴─────────┴──────╯
    
    Sessions
    
    ╭───────────┬──────────┬──────────╮
    │ Execution │ Mode     │ Sessions │
    ├───────────┼──────────┼──────────┤
    │ headless  │ standard │ 1        │
    ╰───────────┴──────────┴──────────╯
    
    ⚠️ 3 log(s)
    • Read:
      NOT_FOUND: /home/runner/work/docs/docs/go-sdk.md
      
    • Bash:
      exit status 1: unknown flag: --output
      
      … (truncated)
      
    • Bash:
      exit status 1: cannot use `--template` without specifying `--json`
      

    Triggered by edenreich · Infer Action

  6. moved this from Todo to In progress in 2026on Jul 21, 2026
  7. moved this from In progress to QA in 2026on Jul 21, 2026
  8. moved this from QA to Done in 2026on Jul 21, 2026
  9. 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