NVIDIA / NVIDIA/nvcf

docs(llm): clarify the function body-format contract for OpenAI-compatible routes

Open
#1,227 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
218
Forks
72
Avg merge
1d 12h
Merged PRs (30d)
427

Description

Problem

The self-managed LLM function workflow accepted CUSTOM for the function body
format while an otherwise equivalent request using OPENAI_CHAT was rejected.
The accepted API contract is not clear enough in the CLI examples and user
documentation, even though invocation uses the OpenAI-compatible
/v1/chat/completions route.

This ambiguity makes a valid router test look like an infrastructure failure
before the function is created.

Expected behavior

The API schema, CLI examples, and self-managed LLM examples agree on the
supported body-format value for OpenAI-compatible LLM functions. If both
values are intended, both work consistently; if only one is intended, the
unsupported value produces a precise validation error.

Acceptance criteria

  • Confirm the intended body-format enum contract for LLM functions.
  • Update CLI and self-managed examples to use the supported value.
  • Explain the relationship between the function body format and the
    OpenAI-compatible invocation routes.
  • Add request-validation coverage for accepted and rejected enum values.
  • Ensure the rejection identifies the invalid field and accepted values.

By submitting this issue, you acknowledge that you are an assigned member of
the NVCF development team and agree to follow the project code of conduct and
contributing guidelines.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the API schema, CLI examples, and self-managed LLM examples that define or use the function body-format value. Compare CUSTOM and OPENAI_CHAT with the request-validation entry points, then add coverage for accepted and rejected enum values. Done means the contract, examples, route relationship, and invalid-field error consistently agree.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, cli, documentation, testing
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.