Skip to content

[DOCS] python-sdk health_check and proxy_request target root-level routes #793

Closed

Description

Summary

The Python SDK client (PyPI: inference-gateway) had a routing bug tracked in
inference-gateway/python-sdk#133: when built the way every README example builds it
(InferenceGatewayClient("http://localhost:8080/v1")), health_check() and
proxy_request() requested /v1/health and /v1/proxy/{provider}/..., but the gateway
serves both routes at the root, so a healthy gateway reported as unavailable and proxy
calls raised errors.

PR inference-gateway/python-sdk#136 fixes both methods to target the root-level routes
(/health and /proxy/{provider}/{path}), stripping a /v1 suffix from base_url the
same way the MCP client methods already do. The existing README "Health Check" and
"Proxy Requests" sections are already correct after the fix; no doc text had to change.

This ticket tracks making that root-route behavior explicit in the docs, so users of
the two methods (and of the MCP endpoints) know they are not version-prefixed.

Affected pages: python-sdk README sections "Health Check" and "Proxy Requests" and any
docs-site pages describing the Python SDK client's health check or proxy usage.

Acceptance Criteria

  • Docs state (where relevant) that health_check() and proxy_request() target the gateway's root-level routes even when base_url ends in /v1
  • No example shows these two methods expecting a /v1-prefixed path
  • If the MCP client methods are documented, the note mentions the same root-route convention

Related PR: inference-gateway/python-sdk#136

Activity

  1. added
    documentation
    on Sep 25, 2026
  2. added theissue type on Sep 25, 2026
  3. edenreich commented on Sep 25, 2026

    @edenreich
    Contributor

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

  4. inference-gateway-maintainer commented on Sep 25, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Model: ollama_cloud/glm-5.3-flash · View Job

    Todos

    • Trace where health_check/proxy_request/MCP endpoints are documented
    • Add issue to Roadmap board, set In progress
    • Create and push fix/issue-793 branch
    • Edit docs: root-route note for health_check/proxy_request (+MCP)
    • Validate: lint:md, format:check, build; commit and push
    • Open draft PR, set board Status to QA

    Pull Request

    #801

    ✅ Infer Result: Success

    Done. PR: #801 (ready for review)

    What changed

    Two sentences in the Python SDK section of sdks.md (+2/-2):

    • "Models, tools, and health": health_check is now documented as probing the gateway's root /health endpoint, with the /v1 suffix on the base URL stripped for this root-level route.
    • "Proxy passthrough": notes the /proxy/{provider}/{path} route lives at the gateway root rather than under /v1, so the suffix is stripped from the base URL.

    Acceptance criteria

    • Root-route behavior for health_check() and proxy_request() is now stated where both are documented - the Python section, which was the only gap (TypeScript, Go, and Rust sections already documented their root /health/proxy routes; the Python MCP note "the endpoint lives at the root, so a /v1 suffix on the base URL is stripped for you" was already present).
    • Grepped the site: no example shows either method expecting a /v1-prefixed path, and no example needed changes.
    • The MCP root-route note already exists, so criterion 3 was satisfied with no edit.

    Skipped (ponytail)

    No new pages, no cross-SDK rewrite, no code-comment additions to examples - the existing TS/Go/Rust wording pattern plus the two sentence tweaks cover the ticket. Nothing downstream: docs-only, no schema/gateway/SDK changes, so no follow-up issues or docs ticket.

    Validation: bun run lint:md, bun run format:check, bun run build all pass. Issue is on the Roadmap board (QA).

    Model: ollama_cloud/glm-5.3-flash · Exit Code: 0 · Duration: 2m 26s

    Tokens: 852,779 in · 7,915 out · 860,694 total (24 requests)

    Tool calls: 28 total · 100% success rate

    Traces
    Session: 1790380142-416e6300
    
    session (headless, success)                                                                        2m18s
    ├── chat ollama_cloud/glm-5.3-flash                                                                 4.7s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.7s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.7s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             4.7s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.7s
    ├── execute_tool Read call_6j2nkc2r                                                                158µs
    ├── execute_tool Memory call_xdrmr8vj                                                               52µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                 4.2s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.2s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.2s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             4.2s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.2s
    ├── execute_tool TodoWrite call_wdrzbxf3                                                           282µs
    ├── execute_tool Grep call_16ai461z                                                                 1.8s
    ├── chat ollama_cloud/glm-5.3-flash                                                                 1.9s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.9s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.9s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             1.9s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.9s
    ├── execute_tool Grep call_9mw9awtr                                                                  5ms
    ├── execute_tool Bash call_s388680c                                                                315ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 4.2s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.2s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.2s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             4.2s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.2s
    ├── execute_tool Read call_sxd9tfy2                                                                179µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                15.6s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                      15.6s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    15.6s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            15.6s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                15.6s
    ├── execute_tool TodoWrite call_31bwi8li                                                            60µs
    ├── execute_tool Bash call_su7i5loj                                                                277ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 1.7s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.7s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.7s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             1.7s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.7s
    ├── execute_tool Bash call_x4doimjc                                                                 1.1s
    ├── chat ollama_cloud/glm-5.3-flash                                                                 1.9s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.9s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.9s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             1.9s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.9s
    ├── execute_tool Bash call_h1hgd4x5                                                                528ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 1.6s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.6s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.6s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             1.6s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.6s
    ├── execute_tool Bash call_51o3cy2m                                                                 53ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 1.3s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.3s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.2s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             1.2s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.2s
    ├── execute_tool Bash call_wvqils15                                                                 1.4s
    ├── chat ollama_cloud/glm-5.3-flash                                                                13.3s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                      13.3s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    13.3s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                            13.3s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                13.3s
    ├── execute_tool MultiEdit call_lxicupeh                                                             1ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 1.7s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.7s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.7s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             1.7s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.7s
    ├── execute_tool Bash call_3j31z7ay                                                                 1.8s
    ├── chat ollama_cloud/glm-5.3-flash                                                                 1.4s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.4s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.4s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             1.4s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.4s
    ├── execute_tool Bash call_q0tw4sd1                                                                 4.5s
    ├── chat ollama_cloud/glm-5.3-flash                                                                 3.2s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.2s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.2s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             3.2s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.2s
    ├── execute_tool Bash call_ax6tj3ie                                                                32.9s
    ├── chat ollama_cloud/glm-5.3-flash                                                                 1.4s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.4s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.4s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             1.4s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.4s
    ├── execute_tool Bash call_wh9ulozu                                                                  6ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 2.3s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.3s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.3s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             2.3s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.3s
    ├── execute_tool Bash call_e5yetil1                                                                  8ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 1.6s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.6s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.6s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             1.6s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.6s
    ├── execute_tool Bash call_zxnmdu5a                                                                 1.8s
    ├── chat ollama_cloud/glm-5.3-flash                                                                 6.1s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       6.0s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     6.0s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             6.0s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 6.0s
    ├── execute_tool Write call_1yefh8xi                                                               822µs
    ├── chat ollama_cloud/glm-5.3-flash                                                                 1.6s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.6s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.6s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             1.6s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.6s
    ├── execute_tool Bash call_rn1f5pem                                                                 2.3s
    ├── chat ollama_cloud/glm-5.3-flash                                                                 2.1s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.1s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.1s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             2.1s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.1s
    ├── execute_tool Bash call_e0qazru3                                                                573ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 1.5s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.5s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.5s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             1.5s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.5s
    ├── execute_tool Bash call_7hju6jwb                                                                 1.1s
    ├── chat ollama_cloud/glm-5.3-flash                                                                 1.6s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.6s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.6s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             1.6s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.6s
    ├── execute_tool Bash call_gma8u5ek                                                                  4ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 1.6s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.6s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.6s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             1.6s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.6s
    ├── execute_tool Bash call_3okm0xph                                                                  4ms
    ├── execute_tool Bash call_ymhu98z2                                                                734ms
    ├── chat ollama_cloud/glm-5.3-flash                                                                 2.9s
    │   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.9s
    │       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.9s
    │           ╰── POST /proxy/:provider/*path [inference-gateway, server]                             2.9s
    │               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.9s
    ├── execute_tool TodoWrite call_9qjggrrg                                                            55µs
    ╰── chat ollama_cloud/glm-5.3-flash                                                                 3.9s
        ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.9s
            ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.8s
                ╰── POST /proxy/:provider/*path [inference-gateway, server]                             3.8s
                    ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.8s
    
    Stats
    Tool Calls
    
    ╭───────────┬───────┬───────┬────────╮
    │ Tool      │ Calls │ Fail% │ Avg    │
    ├───────────┼───────┼───────┼────────┤
    │ Bash      │ 18    │ 0%    │ 2743ms │
    │ TodoWrite │ 3     │ 0%    │ 122µs  │
    │ Read      │ 2     │ 0%    │ 160µs  │
    │ Grep      │ 2     │ 0%    │ 902ms  │
    │ MultiEdit │ 1     │ 0%    │ 2ms    │
    │ Write     │ 1     │ 0%    │ 815µs  │
    │ Memory    │ 1     │ 0%    │ 47µs   │
    ╰───────────┴───────┴───────┴────────╯
    
    Token Usage
    
    ╭────────────────────────────┬────────┬────────┬────────────┬────────┬──────╮
    │ Model                      │ Prompt │ Cached │ Completion │ Total  │ Cost │
    ├────────────────────────────┼────────┼────────┼────────────┼────────┼──────┤
    │ ollama_cloud/glm-5.3-flash │ 852779 │ 609280 │ 7915       │ 860694 │ -    │
    ╰────────────────────────────┴────────┴────────┴────────────┴────────┴──────╯
    
    Sessions
    
    ╭───────────┬──────────┬──────────╮
    │ Execution │ Mode     │ Sessions │
    ├───────────┼──────────┼──────────┤
    │ headless  │ headless │ 1        │
    ╰───────────┴──────────┴──────────╯
    

    Triggered by edenreich · Infer Action · OSS

  5. inference-gateway-releaser commented on Sep 26, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.17 🎉

    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