feat(fireworks,groq,openrouter): add standard model property (#35542)

Add a `model` property to `ChatFireworks`, `ChatGroq`, and
`ChatOpenRouter` that returns `model_name`. These partners use
Pydantic's `Field(alias="model")` on `model_name`, which means
`instance.model` doesn't work as a read accessor after construction — it
raises an `AttributeError` or returns the field descriptor. `ChatOpenAI`
already has this property; this brings the remaining in-repo partners to
parity.
This commit is contained in:
Mason Daugherty
2026-03-03 17:28:46 -05:00
committed by GitHub
parent 6b37ad43dd
commit e50625e7c3
9 changed files with 31 additions and 3 deletions

View File

@@ -328,6 +328,11 @@ class ChatFireworks(BaseChatModel):
model_name: str = Field(alias="model")
"""Model name to use."""
@property
def model(self) -> str:
"""Same as model_name."""
return self.model_name
temperature: float | None = None
"""What sampling temperature to use."""