Parameter max-completion-tokens is not working

Open Beginner friendly
#230 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
typescript
Domain
api, devops

Research direction

Reproduce the workflow using actions/ai-inference@v2 with max-completion-tokens: 4000 and inspect the emitted configuration showing max-tokens: 200. Trace how the action reads this input and compare it with the documented deprecated parameter. Done means the configured completion-token limit is honored and the relevant behavior is covered by an appropriate check.

Written by the indexing model from the issue text.

Description

I'm using

  - name: Generate human-readable report
        id: inference
        uses: actions/ai-inference@v2
        with:
          model: openai/gpt-5
          max-completion-tokens: 4000
          prompt: |
            Turn this .... deployment what-if JSON into a concise human-readable Markdown report.

And the output gives me

endpoint: https://models.github.ai/inference
    system-prompt: You are a helpful assistant
    max-tokens: 200
    token: ***
    enable-github-mcp: false
    provider: github-models
Using legacy prompt format

Max tokens is set to 200 ? Why? Is this max-completion-tokens parameter ignored?

The docs state
"(deprecated, use max-completion-tokens instead)"

Dominant language
TypeScript
Stars
512
Forks
69
Avg merge
20m
Merged PRs (30d)
1

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.

More from actions/ai-inference

All issues in actions/ai-inference

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.