mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
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:
@@ -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."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user