Skip to content

Support persistent custom model options in openai.LLM.withTelnyx() / OpenAI-compatible LLMs #1617

@robbedgdev

Description

@robbedgdev

Your question

Hi LiveKit team,

I’m using the Node.js Agents SDK with @livekit/agents-plugin-openai and Telnyx via:

openai.LLM.withTelnyx({
apiKey,
model: "moonshotai/Kimi-K2.6",
temperature: 0.1,
})

Telnyx exposes an OpenAI-compatible request body parameter called enable_thinking, for example:

{
"enable_thinking": false
}

Currently, withTelnyx() only accepts a fixed set of init options (model, apiKey, baseURL, user, temperature, client). The plugin’s chat() method does support arbitrary extraKwargs, but the default Agent.llmNode() path does not pass any extraKwargs, so there doesn’t seem to be a clean way to set this once at LLM initialization for normal AgentSession usage.

Feature request: add a persistent modelOptions / extraKwargs option to openai.LLM and provider helpers like withTelnyx(), so OpenAI-compatible provider-specific fields can be forwarded on every chat completion request.

Example desired API:

openai.LLM.withTelnyx({
apiKey,
model: "moonshotai/Kimi-K2.6",
temperature: 0.1,
modelOptions: {
enable_thinking: false,
},
})

This would also help with other provider-specific OpenAI-compatible parameters without needing to override llmNode() or wrap the LLM manually.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions