Skip to content

fix agent-framework pyright issue and added examples to CI#400

Merged
lilyydu merged 3 commits intomainfrom
lilyydu/fix-AF-build
Apr 23, 2026
Merged

fix agent-framework pyright issue and added examples to CI#400
lilyydu merged 3 commits intomainfrom
lilyydu/fix-AF-build

Conversation

@lilyydu
Copy link
Copy Markdown
Collaborator

@lilyydu lilyydu commented Apr 22, 2026

1. Pyright was failing on the ai-agentframework example.
The agent-framework package pulls in a bunch of optional sub-packages via its [all] extra. One of those — agent-framework-azure-ai-search==0.0.0a1 — is a broken placeholder alpha that accidentally ships an empty agent_framework/init.py in its wheel. When installed, that empty file overwrites the real one from agent-framework-core, so Python sees an empty agent_framework namespace and pyright can't find Agent, AgentSession, tool, etc.

Replaced imports with agent-framework-core and agent-framework-openai packages, resycned lock file

2. CI wasn't running on examples
Our workflows were only set up to run when files under packages/ changed. This bug was undetected when the sample was added, so proposing to run our examples in CI too.

Copilot AI review requested due to automatic review settings April 22, 2026 23:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes Pyright type-check failures in the examples/ai-agentframework workspace member by switching from the agent-framework wrapper package to agent-framework-core[all], and updates CI path filters so changes under examples/ trigger the main workflow.

Changes:

  • Update examples/ai-agentframework to depend on agent-framework-core[all] instead of agent-framework.
  • Regenerate uv.lock to remove agent-framework and lock the new dependency graph for the example.
  • Expand .github/workflows/ci.yml path filters to include examples/** on PRs and pushes to main.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
uv.lock Removes agent-framework and locks agent-framework-core[all] for the ai-agentframework example.
examples/ai-agentframework/pyproject.toml Switches the example dependency to agent-framework-core[all] to resolve Pyright import/type visibility.
.github/workflows/ci.yml Ensures CI runs when examples/** changes (not only packages/**).

Comment thread .github/workflows/ci.yml
Comment thread examples/ai-agentframework/pyproject.toml Outdated
@lilyydu lilyydu merged commit 35f9fa1 into main Apr 23, 2026
7 checks passed
@lilyydu lilyydu deleted the lilyydu/fix-AF-build branch April 23, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants