Conversation
…malization and streamline tool result processing
- Updated the jsch library from version 2.27.7 to 2.27.8. - Adjusted the corresponding JAR file in the lib directory.
… peer - Introduced `getK8sRemoteURLArrayFunc` to resolve DNS names to channel URLs. - Updated `server.peer` to accept a function for `aRemoteURLArray`. - Minor refactor of `getElasticQuery` formatting.
- Add MCPSERVER flag to control output format - Update and to use when flag is true - Remove legacy usage
- Updated the MCPSERVER flag name for consistency. - Adjusted all references in openaf.js and owrap.server.js. - Ensures future code uses the correct flag name.
…totoom-conditionally Add TOOM output option for MCP text responses
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request enhances OpenAF's Anthropic LLM integration, adds Kubernetes-based peer discovery for distributed channel servers, and introduces MCP server output formatting options. The changes improve tool call handling, streaming behavior, and service discovery in cloud-native deployments.
Changes:
- Enhanced Anthropic LLM integration with improved tool result normalization, refined streaming delta control, and better message content handling
- Added Kubernetes DNS-based peer discovery utility (
getK8sRemoteURLArrayFunc) enabling dynamic service discovery in containerized environments - Introduced configurable MCP server response formatting with TOON output option
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Minor dependency update: jsch library bumped from 2.27.7 to 2.27.8 |
| js/openaf.js | Added MCPSERVER configuration section with answerInTOON flag |
| js/owrap.server.js | Implemented configurable result formatting for MCP server responses using TOON or JSON |
| js/owrap.ch.js | Added Kubernetes DNS-based peer discovery utility and reformatted getElasticQuery (with indentation issues) |
| js/owrap.ai.js | Extensive Anthropic improvements: tool result normalization, content array handling, JSON instruction placement, streaming delta control, and better tool argument reconstruction |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Contributor
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
…RLArrayFunc Co-authored-by: nmaguiar <11761746+nmaguiar@users.noreply.github.com>
…eURLArrayFunc Co-authored-by: nmaguiar <11761746+nmaguiar@users.noreply.github.com>
fix(owrap.ch): correct indentation of getElasticQuery and getK8sRemoteURLArrayFunc in ow.ch.utils
Add error handling for DNS resolution in getK8sRemoteURLArrayFunc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to the handling of Anthropic LLM tool calls and streaming, as well as adding Kubernetes DNS-based peer discovery utilities for channel servers. The changes enhance compatibility with Anthropic's message formats, improve tool result normalization, refine streaming delta handling, and provide a utility for Kubernetes-native service discovery in distributed OpenAF deployments.
Anthropic LLM Integration and Tool Call Handling
_normalizeToolResultForAnthropicfunction, ensuring consistent output formatting for various result types. [1] [2] [3]Channel Server and Kubernetes Integration
getK8sRemoteURLArrayFuncutility toow.ch.utils, enabling dynamic discovery of peer channel URLs via Kubernetes DNS (headless service), with options for protocol, port, path, and exclusion of the current pod IP. This facilitates robust peer-to-peer networking in Kubernetes environments.ow.ch.server.peerto supportaRemoteURLArrayas a function, allowing dynamic peer URL resolution (such as via the new Kubernetes utility). [1] [2]Configuration
MCPSERVERconfig section inopenaf.jswith ananswerInTOONflag, likely for future or external use.