Skip to content

OpenAI example generation and add gpt-5 family support [ #1989 #1990 ] - #1992

Merged
lbroudoux merged 5 commits into
microcks:1.13.xfrom
paulux84:fix/#1989-openai-example-generation
Mar 31, 2026
Merged

lbroudoux merged 5 commits into
microcks:1.13.xfrom
paulux84:fix/#1989-openai-example-generation

Conversation

@paulux84

Copy link
Copy Markdown
Contributor

Description

  • Refactor OpenAI sample generation to retry when the returned completion cannot be parsed, reusing the previous invalid output and parser error to ask for a corrected example instead of failing immediately.
  • Make AI sample generation more resilient at service level by skipping empty generations and logging per-operation failures without aborting the whole asynchronous run.
  • Add compatibility for GPT-5 family models by using max_completion_tokens and conditionally omitting logit_bias when the selected model does not support it, while preserving the existing behavior for previous models.

Related issue(s)

Fixes #1989
Fixes #1990

@paulux84
paulux84 requested review from lbroudoux and yada as code owners March 13, 2026 23:13
@lbroudoux

lbroudoux commented Mar 17, 2026 •

Copy link
Copy Markdown
Member

Woot! It looks great and I'll try to review this on tomorrow!
In the meantime, it happens that you have the DCO check failing because your commits are not signed. Can you please check https://github.com/microcks/microcks/pull/1992/checks?check_run_id=67031293428 and fix it so that I'll be able to merge it?
Thanks,

cc @paulux84

… improve error handling and add support for new `max_completion_tokens` on gpt-5 models family

Signed-off-by: Paolo Pino <[email protected]>
@paulux84
paulux84 force-pushed the fix/#1989-openai-example-generation branch from 0afc000 to 12086e6 Compare March 20, 2026 12:16
@paulux84

Copy link
Copy Markdown
Contributor Author

I've fixed the problem.

cc @lbroudoux

@lbroudoux

lbroudoux commented Mar 20, 2026 •

Copy link
Copy Markdown
Member

I've fixed the problem.

cc @lbroudoux

This is a false positive. I removed the warning. Thanks for pushing the fix, i'll pursue the review asap.

@lbroudoux lbroudoux left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks all good. Thanks for taking the time to put this together @paulux84. I have some work to finalize on 1.13.x as I'm in the middle of #1901 but will merge it asap.

@paulux84

paulux84 commented Mar 20, 2026 •

Copy link
Copy Markdown
Contributor Author

It looks all good. Thanks for taking the time to put this together @paulux84. I have some work to finalize on 1.13.x as I'm in the middle of #1901 but will merge it asap.

thanks for your work @lbroudoux ...really useful for dev community

paulux84 and others added 2 commits March 27, 2026 15:31
…java

Co-authored-by: Sebastien DEGODEZ <[email protected]>
Signed-off-by: Paolo Pino <[email protected]>
Signed-off-by: Laurent Broudoux <[email protected]>
@lbroudoux

Copy link
Copy Markdown
Member

We have a formatting error, but I can fix it just after the merge. I think I'll do it this morning and integrate it into the 1.14.0-rc2 to come.

@lbroudoux
lbroudoux merged commit 55e7d86 into microcks:1.13.x Mar 31, 2026
10 of 12 checks passed
@github-actions

Copy link
Copy Markdown

🎉 @paulux84

You are now a Microcks community contributor! 💖

Thanks and congrats 🚀 on merging your first pull request! We are delighted and very proud of you! 👏

📢 If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact.

If you need to know why and how to add yourself to the list, please read the blog post "Join the Microcks Adopters list and Empower the vibrant open source Community 🙌"

Kudos and please keep going, we need you 🙌

lbroudoux added a commit that referenced this pull request Mar 31, 2026
#1992)

* fix: Refactor OpenAI sample generation to support retry mechanism and improve error handling and add support for new `max_completion_tokens` on gpt-5 models family

Signed-off-by: Paolo Pino <[email protected]>

* fix: Add conditional handling for 'logit_bias' based on model support

Signed-off-by: Paolo Pino <[email protected]>

* test: Add unit tests for `AICopilotRunnerService` and `OpenAICopilot`

Signed-off-by: Paolo Pino <[email protected]>

* Update webapp/src/main/java/io/github/microcks/util/ai/OpenAICopilot.java

Co-authored-by: Sebastien DEGODEZ <[email protected]>
Signed-off-by: Paolo Pino <[email protected]>

* Adding missing Collections import

Signed-off-by: Laurent Broudoux <[email protected]>

---------

Signed-off-by: Paolo Pino <[email protected]>
Signed-off-by: Laurent Broudoux <[email protected]>
Co-authored-by: Sebastien DEGODEZ <[email protected]>
Co-authored-by: Laurent Broudoux <[email protected]>
lbroudoux added a commit that referenced this pull request Mar 31, 2026
#1992)

* fix: Refactor OpenAI sample generation to support retry mechanism and improve error handling and add support for new `max_completion_tokens` on gpt-5 models family

Signed-off-by: Paolo Pino <[email protected]>

* fix: Add conditional handling for 'logit_bias' based on model support

Signed-off-by: Paolo Pino <[email protected]>

* test: Add unit tests for `AICopilotRunnerService` and `OpenAICopilot`

Signed-off-by: Paolo Pino <[email protected]>

* Update webapp/src/main/java/io/github/microcks/util/ai/OpenAICopilot.java

Co-authored-by: Sebastien DEGODEZ <[email protected]>
Signed-off-by: Paolo Pino <[email protected]>

* Adding missing Collections import

Signed-off-by: Laurent Broudoux <[email protected]>

---------

Signed-off-by: Paolo Pino <[email protected]>
Signed-off-by: Laurent Broudoux <[email protected]>
Co-authored-by: Sebastien DEGODEZ <[email protected]>
Co-authored-by: Laurent Broudoux <[email protected]>
(cherry picked from commit 1419d23)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants