Summary
When actions/ai-inference runs in structured .prompt.yml mode, the workflow log still shows the action input defaults in the with: block, for example:
model: openai/gpt-4o
system-prompt: You are a helpful assistant
max-tokens: 200
However, the implementation later loads the .prompt.yml file and resolves the effective model and model parameters from promptConfig.
That means a run can actually use values from the prompt file while the visible log output strongly suggests the defaults are in effect.
Why this is confusing
From the repo:
action.yml defines defaults for model, system-prompt, and max-tokens
dist/index.js then does:
const modelName = promptConfig?.model || core.getInput('model')
const maxCompletionTokensInput = promptConfig?.modelParameters?.maxCompletionTokens ?? core.getInput('max-completion-tokens')
const maxTokensInput = promptConfig?.modelParameters?.maxTokens ?? core.getInput('max-tokens')
const temperature = promptConfig?.modelParameters?.temperature ?? ...
So behavior is correct, but observability is misleading.
Reproduction pattern
Use a .prompt.yml file with values such as:
model: openai/gpt-4.1
responseFormat: json_schema
modelParameters:
temperature: 0.0
maxCompletionTokens: 900
and call the action like this:
- uses: actions/ai-inference@v1
with:
prompt-file: ./.github/prompts/sample.prompt.yml
input: |
foo: bar
The log shows:
Using prompt YAML file format
- but the earlier
with: block still displays the input defaults (openai/gpt-4o, You are a helpful assistant, max-tokens: 200)
This makes it hard to tell which model/config was actually used.
Expected behavior
One of these would solve it:
- Add an explicit log section after loading
.prompt.yml, for example:
- resolved model
- resolved response format
- resolved max completion tokens / max tokens
- resolved temperature / topP
- Or document clearly in the README that the
with: block shows action input defaults and is not the final resolved config in .prompt.yml mode.
- Ideally both.
Notes
I do not think the inference behavior is wrong here. This looks like a logging / diagnostics gap specific to .prompt.yml mode.
Summary
When
actions/ai-inferenceruns in structured.prompt.ymlmode, the workflow log still shows the action input defaults in thewith:block, for example:model: openai/gpt-4osystem-prompt: You are a helpful assistantmax-tokens: 200However, the implementation later loads the
.prompt.ymlfile and resolves the effective model and model parameters frompromptConfig.That means a run can actually use values from the prompt file while the visible log output strongly suggests the defaults are in effect.
Why this is confusing
From the repo:
action.ymldefines defaults formodel,system-prompt, andmax-tokensdist/index.jsthen does:const modelName = promptConfig?.model || core.getInput('model')const maxCompletionTokensInput = promptConfig?.modelParameters?.maxCompletionTokens ?? core.getInput('max-completion-tokens')const maxTokensInput = promptConfig?.modelParameters?.maxTokens ?? core.getInput('max-tokens')const temperature = promptConfig?.modelParameters?.temperature ?? ...So behavior is correct, but observability is misleading.
Reproduction pattern
Use a
.prompt.ymlfile with values such as:and call the action like this:
The log shows:
Using prompt YAML file formatwith:block still displays the input defaults (openai/gpt-4o,You are a helpful assistant,max-tokens: 200)This makes it hard to tell which model/config was actually used.
Expected behavior
One of these would solve it:
.prompt.yml, for example:with:block shows action input defaults and is not the final resolved config in.prompt.ymlmode.Notes
I do not think the inference behavior is wrong here. This looks like a logging / diagnostics gap specific to
.prompt.ymlmode.