Development (#4)#6
Conversation
MitulShah1
commented
May 28, 2026
- feat: ship langchain adapter
- fix: support langchain integration on python 3.9
* feat: ship langchain adapter * fix: support langchain integration on python 3.9
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a4562d52e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if trace_id and "trace_id" not in data and "x_ferro_trace_id" not in data: | ||
| data["trace_id"] = trace_id |
There was a problem hiding this comment.
Preserve non-object JSON responses
When endpoints that legitimately return a top-level list include the gateway request-id header, this helper now treats that list as a dict and executes data["trace_id"] = ..., raising TypeError before resource code can handle it. I checked the SDK callers: admin.keys.list(), admin.providers.list(), admin.plugins.list(), and models.list() all explicitly support list responses, so any gateway that adds x-request-id/x-trace-id to those responses will regress; only inject metadata after verifying the parsed body is a dict.
Useful? React with 👍 / 👎.
| base_url: str | None = Field( | ||
| default=None, | ||
| description="Gateway URL. Defaults to FERRO_BASE_URL env var or http://localhost:8080.", | ||
| ) |
There was a problem hiding this comment.
Drop Python 3.9 or avoid PEP 604 syntax
This new integration still advertises Python 3.9 support in pyproject.toml and the publish workflow matrix runs tests on Python 3.9, but the added modules use X | None annotations throughout. Python 3.9 cannot parse this syntax, so importing langchain_ferrolabsai (and therefore the 3.9 workflow/job and any 3.9 user install) fails with SyntaxError; either raise the package/workflow minimum to 3.10 or rewrite these annotations using Optional/Union.
Useful? React with 👍 / 👎.
* Development (#4) (#6) * feat: ship langchain adapter * fix: support langchain integration on python 3.9 * test: cover admin plugins list (#25) * test: cover admin dashboard (#23) * fix: raise FerroStreamError on malformed streaming chunks Both the sync and async _stream() paths swallowed JSONDecodeError with a bare `continue`, silently dropping malformed SSE chunks and losing data with no error or log. They now raise FerroStreamError instead — the first code path that actually raises this previously-unused exception. Also adds the {"plugins": [...]} wrapper coverage for admin.plugins.list() and streaming malformed-chunk regression tests for both clients. Closes #15 Closes #16 * ci: add release-notes config to credit contributors on tagged releases Add .github/release.yml so GitHub's auto-generated release notes (the publish job already runs softprops/action-gh-release with generate_release_notes: true) group merged PRs by label and credit every contributor by @handle, plus a "New Contributors" section. Contributor credit lives in the release notes only, not in CHANGELOG.md. --------- Co-authored-by: Tine <119507611+tine1117@users.noreply.github.com> Co-authored-by: AmitabhainArunachala <79852583+AmitabhainArunachala@users.noreply.github.com>