Skip to content

Remove deprecation in ObservationContext for models #2518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
5 of 12 tasks
ThomasVitale opened this issue Mar 19, 2025 · 0 comments · May be fixed by #2896
Open
5 of 12 tasks

Remove deprecation in ObservationContext for models #2518

ThomasVitale opened this issue Mar 19, 2025 · 0 comments · May be fixed by #2896
Assignees
Milestone

Comments

@ThomasVitale
Copy link
Contributor

ThomasVitale commented Mar 19, 2025

In 1.0.0-M6, the ".requestOptions()" method for ModelObservationContext instances has been deprecated and marked for removal. This issue is to track the changes needed to use the new strategy and remove the deprecated logic.

ThomasVitale added a commit to ThomasVitale/spring-ai that referenced this issue Mar 19, 2025
Relates to spring-projectsgh-2518

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
ThomasVitale added a commit to ThomasVitale/spring-ai that referenced this issue Mar 19, 2025
Relates to spring-projectsgh-2518

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
ThomasVitale added a commit to ThomasVitale/spring-ai that referenced this issue Mar 19, 2025
Relates to spring-projectsgh-2518

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
ilayaperumalg pushed a commit that referenced this issue Mar 27, 2025
Relates to gh-2518

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
ilayaperumalg pushed a commit that referenced this issue Mar 27, 2025
Relates to gh-2518

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
ilayaperumalg pushed a commit that referenced this issue Mar 27, 2025
Relates to gh-2518

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
leijendary pushed a commit to leijendary/spring-ai that referenced this issue Mar 28, 2025
Relates to spring-projectsgh-2518

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
leijendary pushed a commit to leijendary/spring-ai that referenced this issue Mar 28, 2025
Relates to spring-projectsgh-2518

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
leijendary pushed a commit to leijendary/spring-ai that referenced this issue Mar 28, 2025
Relates to spring-projectsgh-2518

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
TheovanKraay pushed a commit to TheovanKraay/spring-ai that referenced this issue Apr 11, 2025
Relates to spring-projectsgh-2518

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
Signed-off-by: Theo van Kraay <theo.van@microsoft.com>
TheovanKraay pushed a commit to TheovanKraay/spring-ai that referenced this issue Apr 11, 2025
Relates to spring-projectsgh-2518

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
Signed-off-by: Theo van Kraay <theo.van@microsoft.com>
TheovanKraay pushed a commit to TheovanKraay/spring-ai that referenced this issue Apr 11, 2025
Relates to spring-projectsgh-2518

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
Signed-off-by: Theo van Kraay <theo.van@microsoft.com>
@markpollack markpollack added this to the 1.0.0-RC1 milestone Apr 21, 2025
sobychacko added a commit to sobychacko/spring-ai that referenced this issue Apr 26, 2025
…t objects

Fixes: spring-projects#2518

Issue: spring-projects#2518

This commit removes the deprecated requestOptions field from ChatModelObservationContext
and EmbeddingModelObservationContext classes. Instead of passing options separately,
the code now retrieves them directly from the request objects (prompt.getOptions() or
embeddingRequest.getOptions()).

Key changes:
- Removed requestOptions parameter from observation context builders
- Updated all model implementations to stop passing options separately
- Fixed EmbeddingRequest handling in several model implementations
- Added buildEmbeddingRequest method in models to properly merge options

This change simplifies the API and removes duplication, as options are already
available in the request objects themselves.

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants