Skip to content

Local gateway + Ollama code example broken — base_url missing /v1 — Epic Games#812

Open
anshulbasia27 wants to merge 2 commits intomainfrom
gap/pylon-0
Open

Local gateway + Ollama code example broken — base_url missing /v1 — Epic Games#812
anshulbasia27 wants to merge 2 commits intomainfrom
gap/pylon-0

Conversation

@anshulbasia27
Copy link

@anshulbasia27 anshulbasia27 commented Mar 17, 2026

Summary

Fix broken code example in the Ollama local setup docs. The base_url parameter was missing the required /v1 path suffix, causing SDK errors when connecting to a local Portkey gateway.

What changed

  • integrations/llms/ollama.mdx:
    • Fixed base_url from http://localhost:8787 to http://localhost:8787/v1 in the Local Setup Python example
    • Added a Node.js code example alongside the Python one (wrapped in <CodeGroup>)
    • Clarified the <Note> block at the bottom of the page to distinguish between custom_host (Ollama URL, no /v1) and base_url (gateway URL, requires /v1)

Customer context

Reported by Epic Games. The customer provided screenshots showing:

  1. Working response when base_url includes /v1 (successful chat completion via Ollama)
  2. Error when /v1 is omitted

Acceptance criteria

  • base_url in Local Setup example includes /v1
  • Node.js example added for parity
  • <Note> block clarified to avoid confusion between custom_host and base_url

@anshulbasia27
Copy link
Author

@Cursor-AI Please review this PR.

Context

This PR was automatically generated by Altor to address a customer-reported product gap for Epic Games.

Field Value
Customer Epic Games
Category support-gap
Gap Local gateway + Ollama code example broken — base_url missing /v1

Requirement

Local gateway + Ollama code example broken — base_url missing /v1

Acceptance Criteria

Please verify each of the following is satisfied by the implementation:

  • Verify the fix resolves the customer-reported issue without regressions

References

Review Focus

  • Correctness: Does the implementation fully satisfy the requirement and acceptance criteria above?
  • Edge cases: Are there scenarios involving Local gateway + Ollama code example broken — base_url missing /v1 that are not handled?
  • Regressions: Could any existing behaviour be broken by these changes?
  • Code quality: Are there obvious improvements to readability, error handling, or performance?

Please call out anything that looks incomplete or incorrect before this is merged.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant