Skip to content

feat(providers): add GreenPT as an OpenAI-compatible provider (passthrough) #12986

Closed

Description

@diegosouzapw

Feature Request

Source: Discussion #12943 by @dfigos-2000 (documentation audit supplied by the reporter)

Summary

Add GreenPT as an OpenAI-compatible API-key provider. Not on docs/reference/REMOVED_PROVIDERS.md.

Unlike #12985 (EURouter), GreenPT is an inference provider rather than a router — so it is the one of the two that can carry an actual data-residency claim, if its terms support one.

Evidence

Verified live (2026-09-07): GET https://api.greenpt.ai/v1/models returns HTTP 401 Unauthorized. That confirms the endpoint exists and is key-gated — the expected shape for passthroughModels: true, where OmniRoute forwards the operator's key. Catalog contents remain unverified (no account).

From the reporter's documentation audit (published docs, not live-tested):

Feature Documented
GET /v1/models, OpenAI-style list yes
stream: true, chat.completion.chunk yes
choices[].delta.content, finish_reason, data: [DONE] yes
Final usage chunk yes — always emitted, stream_options.include_usage not required
Tool-call streaming not fully documented
impact field GreenPT-specific extension

Implementation

Registry entry in src/shared/constants/providers/apikey/gateways.ts — the mnn-ai / meganova-ai shape. No executor, no translator.

Two documented divergences to handle rather than discover in production:

  1. Usage is always emitted, not gated behind stream_options.include_usage. Confirm our stream parsing does not treat the unsolicited final usage chunk as content or as a protocol error.
  2. impact is a non-standard field. It must be ignored by the passthrough path, not forwarded into a client response where it could confuse an OpenAI-shaped consumer.

Tool-call streaming is undocumented — verify against a live key before advertising tool support in the entry's capabilities. Advertising a capability we have not exercised is how a provider looks broken to users.

Acceptance criteria

  • Registry entry with passthroughModels: true, base https://api.greenpt.ai/v1
  • Live verification with a real key: /v1/models, one streaming completion, one tool call
  • Tool support advertised only if exercised
  • freeNote only if a free tier exists and is published (docs indicate free API subscription, pay-per-token inference — state exactly that, no more)
  • Unit tests under tests/unit/

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions