Skip to content

OpenAI-compat: OpenAiInferenceEngine base_url /v1 with logprobs off #1977

Description

@cursor

Working config (OpenAiInferenceEngine + base_url /v1)

Unitxt OpenAiInferenceEngine posts Chat Completions. base_url is the /v1 root (or OPENAI_API_URL). Default logprobs=True is not supported on every Chat Completions host. CrossProviderInferenceEngine only lists configured providers. AzureOpenAIInferenceEngine is Azure.

A host whose public catalog is GET https://api.pzero.studio/v1/models (no key) fits:

import os
from unitxt.inference import OpenAiInferenceEngine

os.environ["OPENAI_API_KEY"] = "<Bearer key for that host>"

engine = OpenAiInferenceEngine(
    model_name="deepseek-v4-flash",
    base_url="https://api.pzero.studio/v1",
    logprobs=False,
)

model_name is a catalog id. Do not paste /v1/chat/completions as base_url.

Not asking for a first-party provider. OpenAiInferenceEngine plus base_url plus logprobs=False is enough.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions