Query Library - Ternary operator for default value removes variable from list

interestingly enought, if I start with {{ model_name }} and i add a value like 'gpt' if I go back and change it to {{ model_name === ""? 'gpt-4o' : model_name }} the value is still recognized, but the variable isn't listed:

Hi @bobthebear,

Woah that is a very odd find. That you for tracking down this bug!

I wonder if it is just the UI for the variable input that changes when you add a default value and then ternary or if the query will error out if model is missing from the right side even when it appears and evals as shown in your last screen shot.

I can definitely repro this and file a bug report. What type of query/resource is this?

it's an OpenAPI request to OpenAI using the specs from https://raw.githubusercontent.com/openai/openai-openapi/master/openapi.yaml

1 Like

Ok thanks for letting me know and linking that.

Will keep you updated on the bug report ticket.

1 Like