-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: getDiscrminator
return undefined while TCGC can find the discriminator
#3184
Comments
@archerzz is this an issue with tcgc or typespec I don't really get here? |
@timotheeguerin I think it's in typespec, because |
how is tcgc getting it if the compiler is not returning it? can you make a smaller repro with exactly what is not working? |
@tadelesh Is that possible that TCGC assigns a wrong instance to |
See: https://github.com/Azure/azure-rest-api-specs/blob/c4e661cdf92c8f579574008d0cd11874cc303da0/specification/ai/OpenAI.Assistants/runs/models.tsp#L40. |
so is the issue you are calling Can this issue be closed? |
@timotheeguerin sure, thank you all for the investigation |
Describe the bug
Check the TSP spec for
OpenAI.Assitants
: https://github.com/Azure/azure-rest-api-specs/blob/c4e661cdf92c8f579574008d0cd11874cc303da0/specification/ai/OpenAI.Assistants/runs/models.tsp#L171-L188RequiredAction
is the base model, andSubmitToolOutputsAction
is the child model.getDiscriminator()
onRequiredAction
will returnundefined
, while TCGC can find the discriminator.Here
modelType
is the TCGC SdkModelType, andmodelType.__raw
is the compiler type.Reproduction
Just try to parse the Tsp spec in the link above.
Checklist
The text was updated successfully, but these errors were encountered: