Skip to content

Core: Add framework-neutral model client adapters - #524

Draft
Minseok Song (skytin1004) wants to merge 1 commit into
Azure:mainfrom
skytin1004:feature/agent-framework-model-client
Draft

Core: Add framework-neutral model client adapters#524
Minseok Song (skytin1004) wants to merge 1 commit into
Azure:mainfrom
skytin1004:feature/agent-framework-model-client

Conversation

@skytin1004

Copy link
Copy Markdown
Collaborator

Purpose

Introduce a framework-neutral model client boundary so Co-op Translator can evaluate Microsoft Agent Framework without exposing framework-specific types throughout the translation pipeline. Semantic Kernel remains the default backend.

Description

  • Add TranslationModelClient and ModelResponse as the minimal internal completion contract.
  • Add Semantic Kernel and Microsoft Agent Framework adapters.
  • Select the experimental adapter with CO_OP_TRANSLATOR_MODEL_CLIENT=agent-framework; invalid values fail clearly.
  • Route Azure OpenAI and OpenAI Markdown translation and LLM evaluation through the shared contract while preserving credential-set fallback.
  • Allow injected Agent Framework clients, including Anthropic and Ollama connectors, to bypass OpenAI-specific credential handling.
  • Add current Agent Framework core/OpenAI runtime dependencies and development-only Anthropic/Ollama connectors.
  • Document backend selection and explicitly keep image structured-output translation on its existing OpenAI SDK path.

Related Issue

N/A

Does this introduce a breaking change?

Will this change require users to update commands, configuration, environment variables, generated translation output, or public Python/MCP APIs?
If you're not sure, test the affected CLI, API, documentation, or GitHub Actions workflow before marking this as "No."

  • Yes
  • No

Type of change

  • Bugfix
  • Feature
  • Code style update (e.g., formatting, local variables)
  • Refactoring (no functional or API changes)
  • Documentation content changes
  • Other... Please describe:

Checklist

Before submitting your pull request, please confirm the following:

  • I have thoroughly tested my changes: I confirm that I have run the code and manually tested all affected areas.
  • All existing tests pass: I have run all tests and confirmed that nothing is broken.
  • I have added new tests (if applicable): I have written tests that cover the new functionality introduced by my code changes.
  • I have followed the Co-op Translator coding conventions: My code adheres to the style guide and coding conventions outlined in the repository.
  • I have documented my changes (if applicable): I have updated the documentation to reflect the changes where necessary.

Additional context

Validation completed:

  • Python 3.12 full suite: 381 passed
  • Black, Ruff, and mypy checks pass
  • Poetry lock consistency and pip check pass
  • Live configured-provider smoke tests pass for both Semantic Kernel and Agent Framework direct completion
  • Live Agent Framework Markdown translation, Python API, CLI, and MCP translation pass
  • Agent Framework's Ollama connector completed a direct request against a separate CPU-only local server
  • The local phi4-mini:3.8b model did not preserve Co-op Translator's chunk envelope during a full Markdown translation, so Ollama model quality/compatibility is not claimed by this PR
  • Anthropic connector compatibility is covered with the real connector class and a mocked network response; no live Anthropic test was run because no credential was available

This PR intentionally retains Semantic Kernel and keeps it as the default. It establishes the comparison boundary; it does not yet remove Semantic Kernel or promise production support for every Agent Framework provider.

@github-actions github-actions Bot added documentation Improvements or additions to documentation build Related to the build process, dependency management, and CI/CD configurations core Related to any changes in core source files tests labels Aug 30, 2026
@skytin1004

Copy link
Copy Markdown
Collaborator Author

CI status note: Python 3.11-3.14, the Python 3.14 requirements check, CodeQL, and documentation build all pass. The Co-op review check reports 110 structure errors because the two changed documentation files (AGENTS.md and docs/configuration.md) do not have corresponding files in each of the 55 translation directories. This is documentation-translation coverage, not a model-client test or runtime failure; I am leaving the PR in Draft while that repository-wide documentation policy is considered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Related to the build process, dependency management, and CI/CD configurations core Related to any changes in core source files documentation Improvements or additions to documentation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant