Skip to content

[DOCS] TypeScript SDK: listModels include parameter and model metadata fields #453

Closed

Description

Summary

The TypeScript SDK (@inference-gateway/sdk) now supports the include query parameter on listModels, matching the gateway's GET /v1/models endpoint and the Go SDK sync (inference-gateway/sdk#131).

New public API surface:

  • listModels(provider?, include?) accepts an include array (values: context_window, pricing), serialized as a comma-separated query value.
  • Model responses may now carry nullable context_window (tokens, source) and pricing (currency, per-token prices, source, updated_at) fields, exposed as SchemaContextWindow and SchemaPricing types.

Implemented in: inference-gateway/typescript-sdk#165

Acceptance Criteria

  • TypeScript SDK docs mention the include parameter on listModels with its supported values
  • The new context_window and pricing model metadata fields are documented
  • Example snippet showing listModels with include values

Activity

  1. added
    documentation
    on Jul 21, 2026
  2. edenreich commented on Jul 21, 2026

    @edenreich
    Contributor

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

  3. moved this to Todo in 2026on Jul 21, 2026
  4. added theissue type on Jul 21, 2026
  5. inference-gateway-maintainer commented on Jul 21, 2026

    @inference-gateway-maintainer
    ContributorAuthor

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

    Todos

    Pull Request

    #454

    ✅ Infer Result: Success

    Updated the TypeScript SDK docs in sdks.md to document the listModels(provider?, include?) parameter with context_window and pricing values, added example code showing both metadata fields, and opened draft PR #454.

    Model: ollama_cloud/deepseek-v4-flash · Exit Code: 0 · Duration: 3m 9s

    Tokens: 2,873,566 in · 6,724 out · 2,880,290 total (28 requests)

    Tool calls: 37 total · 95% success rate

    Traces
    Session: 1784629157-39a4c885
    
    session (standard, success)                  3m7s
    ├── chat ollama_cloud/deepseek-v4-flash     11.1s
    ├── execute_tool TodoWrite call_aj0wo6a0    401µs
    ├── chat ollama_cloud/deepseek-v4-flash      2.0s
    ├── execute_tool Tree call_28bji6ez           2ms
    ├── execute_tool Read call_kx888dk7         306µs
    ├── execute_tool Read call_50b2w0tt         105µs [error: tool_error]
    ├── chat ollama_cloud/deepseek-v4-flash      1.9s
    ├── execute_tool Bash call_j0rfuhun          54ms
    ├── execute_tool Bash call_2wsa96yt           3ms
    ├── chat ollama_cloud/deepseek-v4-flash     11.5s
    ├── execute_tool TodoWrite call_f3expqq8     73µs
    ├── chat ollama_cloud/deepseek-v4-flash      1.9s
    ├── execute_tool Read call_njysiuqb           2ms
    ├── execute_tool Bash call_83ebsges         245ms
    ├── execute_tool Read call_aq0mcoa9           2ms
    ├── chat ollama_cloud/deepseek-v4-flash      4.5s
    ├── execute_tool Bash call_v1763795          1.0s
    ├── execute_tool Bash call_7er2lw1c         304ms
    ├── chat ollama_cloud/deepseek-v4-flash      2.1s
    ├── execute_tool Bash call_y3ma485z         24.7s
    ├── chat ollama_cloud/deepseek-v4-flash      4.2s
    ├── execute_tool Bash call_sce54qam           7ms
    ├── execute_tool Bash call_fkaph8ll         511ms
    ├── chat ollama_cloud/deepseek-v4-flash      8.6s
    ├── execute_tool TodoWrite call_nxd0nxs6     76µs
    ├── chat ollama_cloud/deepseek-v4-flash      2.6s
    ├── execute_tool Read call_dg297gsf         213µs
    ├── chat ollama_cloud/deepseek-v4-flash      4.6s
    ├── chat ollama_cloud/deepseek-v4-flash      3.4s
    ├── execute_tool Edit call_6wy2skhz         701µs
    ├── chat ollama_cloud/deepseek-v4-flash      4.0s
    ├── execute_tool Edit call_y9z5cwa0           2ms
    ├── chat ollama_cloud/deepseek-v4-flash      3.7s
    ├── execute_tool Read call_ruya6eaw         220µs
    ├── chat ollama_cloud/deepseek-v4-flash      4.2s
    ├── execute_tool TodoWrite call_viglvbrd     48µs
    ├── chat ollama_cloud/deepseek-v4-flash      2.8s
    ├── execute_tool Bash call_k6i4x2ud          4.0s [error: tool_error]
    ├── execute_tool Bash call_oiekuk84          1.9s
    ├── chat ollama_cloud/deepseek-v4-flash      3.8s
    ├── execute_tool Bash call_qj3msrur          3.4s
    ├── chat ollama_cloud/deepseek-v4-flash      2.3s
    ├── execute_tool Bash call_13e7ksgb         21.2s
    ├── chat ollama_cloud/deepseek-v4-flash     16.7s
    ├── execute_tool TodoWrite call_b7v8o46b     57µs
    ├── chat ollama_cloud/deepseek-v4-flash      2.3s
    ├── execute_tool Bash call_qze0ecvu           7ms
    ├── chat ollama_cloud/deepseek-v4-flash      3.7s
    ├── execute_tool Bash call_pn3ovn6i           9ms
    ├── chat ollama_cloud/deepseek-v4-flash      2.6s
    ├── execute_tool Bash call_6uldyy6d          3.1s
    ├── chat ollama_cloud/deepseek-v4-flash      2.9s
    ├── execute_tool Write call_jsxx2fs5        663µs
    ├── chat ollama_cloud/deepseek-v4-flash      2.5s
    ├── execute_tool Bash call_yio5cqk7          1.9s
    ├── chat ollama_cloud/deepseek-v4-flash      2.4s
    ├── execute_tool Bash call_lr6pysoe         621ms
    ├── chat ollama_cloud/deepseek-v4-flash      2.4s
    ├── execute_tool Bash call_osz9an8g         932ms
    ├── execute_tool Bash call_68ihnoiw           6ms
    ├── execute_tool Bash call_m68im90h           6ms
    ├── chat ollama_cloud/deepseek-v4-flash      4.8s
    ├── execute_tool TodoWrite call_1ln5qwv4     63µs
    ├── chat ollama_cloud/deepseek-v4-flash      3.0s
    ╰── chat ollama_cloud/deepseek-v4-flash      2.2s
    
    Stats
    Tool Calls
    
    ╭───────────┬───────┬───────┬────────╮
    │ Tool      │ Calls │ Fail% │ Avg    │
    ├───────────┼───────┼───────┼────────┤
    │ Bash      │ 20    │ 5%    │ 3201ms │
    │ TodoWrite │ 6     │ 0%    │ 0ms    │
    │ Read      │ 6     │ 17%   │ 0ms    │
    │ Edit      │ 2     │ 0%    │ 1ms    │
    │ Write     │ 1     │ 0%    │ 0ms    │
    │ Tree      │ 1     │ 0%    │ 2ms    │
    ╰───────────┴───────┴───────┴────────╯
    
    Token Usage
    
    ╭────────────────────────────────┬─────────┬────────┬────────────┬─────────┬──────╮
    │ Model                          │ Prompt  │ Cached │ Completion │ Total   │ Cost │
    ├────────────────────────────────┼─────────┼────────┼────────────┼─────────┼──────┤
    │ ollama_cloud/deepseek-v4-flash │ 3011826 │ 0      │ 6765       │ 3018591 │ -    │
    ╰────────────────────────────────┴─────────┴────────┴────────────┴─────────┴──────╯
    
    Sessions
    
    ╭───────────┬──────────┬──────────╮
    │ Execution │ Mode     │ Sessions │
    ├───────────┼──────────┼──────────┤
    │ headless  │ standard │ 1        │
    ╰───────────┴──────────┴──────────╯
    
    ⚠️ 2 log(s)
    • Read:
      path '/home/runner/.gitignore' is outside configured sandbox directories
      
    • Bash:
      exit status 1: $ prettier --check .
      Checking formatting...
      … (truncated)
      

    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